Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 01-15-2006, 12:46 PM   #1
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, 02:51 PM   #2
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.3, Oracle Linux, Mint
Posts: 9,669

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
You can compile from vi or vi clones just like you can do it with C.
Old 01-15-2006, 04:18 PM   #3
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:

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


Old 01-16-2006, 10:46 AM   #4
Registered: Jul 2005
Location: maryland
Distribution: Ubuntu 9.04
Posts: 88

Rep: Reputation: 17

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:

javac -Xlint:all -g *.java

javac -g -Xlint:all -g *.java
jar -cvf jarfile.jar *.class *.jpg
echo Main-Class: Driver>
echo Sealed: true>>
jar -uvmf 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, 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, 02:05 PM   #5
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.3, Oracle Linux, Mint
Posts: 9,669

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

Rep: Reputation: Disabled
Another IDE is BlueJ.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 04:14 PM
Which sound or ?music? editor you would like to recommend ...... alred General 14 05-31-2005 04:01 PM
Recommend good, easy to setup, hopefully graphical FtpServer. Lurker01 *BSD 2 09-10-2004 12:20 PM
Can anyone recommend a good text editor? MadCactus Linux - General 11 08-23-2003 01:43 PM
recommend a good easy to use FTP server Chooco Linux - Networking 9 06-21-2002 01:16 AM

All times are GMT -5. The time now is 06:39 PM.

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