LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-15-2006, 11:46 AM   #1
mineshvarmas
LQ Newbie
 
Registered: Jan 2006
Posts: 5

Rep: Reputation: 0
recommend any fast easy java editor


could anyone suggest an editor (or IDE)to
write java code and compile and debug java programs.

i have used vi for a very short time, for c programming, it is fast. i tried to use it for java, the editing part was fine. but when it came to running the code, i got stuck with it. i don't want to open another terminal and then compile.
would emacs be a better choice?

sometimes i just want to write a single class and test run it. i don't want to generate a lot of project settings files (like the IDEs do).

what about emacs? i have heard of it but never used it.

many thanks.
 
Old 01-15-2006, 01:51 PM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
You can compile from vi or vi clones just like you can do it with C.
 
Old 01-15-2006, 03:18 PM   #3
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
I've heard good things about JEdit over the years:
http://www.jedit.org/

If you wanted a full-fledged IDE, the two most popular Open Source alternatives are:

Eclipse:
http://www.eclipse.org

NetBeans:
http://www.netbeans.org
 
Old 01-16-2006, 09:46 AM   #4
kike_coello
Member
 
Registered: Jul 2005
Location: maryland
Distribution: Ubuntu 9.04
Posts: 88

Rep: Reputation: 17
dude

if you just want to compile real quick without having a second terminal or exiting vi all you gotta do is write a script that will compile and execute you java projects, kinda like a make file, i wrote a tiny script if you want, actually two, "short" is supposed to just compile all the java files under the directory, it will not run the main file; "run" is the file that compiles all java files, makes a jar file (executable with a double click), executes program, and removes all temp files and class files (clean up). here they are:

short:
======
clear
javac -Xlint:all -g *.java


run:
====
clear
javac -g -Xlint:all -g *.java
jar -cvf jarfile.jar *.class *.jpg
echo Main-Class: Driver> manifest.mf
echo Sealed: true>> manifest.mf
jar -uvmf manifest.mf jarfile.jar
java -jar jarfile.jar
rm *.class

to execute from vi, just enter command mode with escape and then type ":!run" or ":!short", you'll see your files compile and after execution of the script file, you'll be asked to press enter.

one last thing, i suggest you copy these 2 files to all your projects, and have each project in a different directory because, the script is going to look for the main file which i always name Driver.java, if you want to name your main class something else, then just change it in the run script: on the line that says Main-Class, just change "Driver" with the name of your main file without the .java extension

peace out
 
Old 01-16-2006, 01:05 PM   #5
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
You can also use real Makefiles or better, ant files.
 
Old 01-16-2006, 01:08 PM   #6
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Another IDE is BlueJ.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Which video editor would you like to recommend ..... alred General 5 06-21-2005 03:14 PM
Which sound or ?music? editor you would like to recommend ...... alred General 14 05-31-2005 03:01 PM
Recommend good, easy to setup, hopefully graphical FtpServer. Lurker01 *BSD 2 09-10-2004 11:20 AM
Can anyone recommend a good text editor? MadCactus Linux - General 11 08-23-2003 12:43 PM
recommend a good easy to use FTP server Chooco Linux - Networking 9 06-21-2002 12:16 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration