• 0

[JAVA] Which text editor do you use for JAVA?


Question

15 answers to this question

Recommended Posts

  • 0

I use NetBeans for personal. And Eclipse for school & work.

If you must use the command line, then I'd use gedit or emacs. And you'll need to install java to get the javac compiler.

Most distros have a package manager which will have gedit, emacs, and Java (whether IcedTea or Sun's) listed; just install those.

Link to comment
Share on other sites

  • 0

Another vote for eclipse, why make your life difficult with a text editor when you can have building, running, debugging, deploying, auto-formatting and auto-complete all in one.

Link to comment
Share on other sites

  • 0

nthing Eclipse.

For the rare times where I'd like to look at code outside of it, I go with Notepad++.

Since it's not part of an IDE it doesn't have fancy features like code completion, but it does have capable syntax highlighting and a feature I'm surprised I don't see more: if you highlight a token (a variable name, for example), it'll highlight all other instances of that token.

Link to comment
Share on other sites

  • 0

how do we use javac at the commandline?

javac -cp myfile.jar:mydirectory MyClass.java

Where anything in the -cp argument (myfile.jar and mydirectory) hold any classes your MyClass.java needs to compile. Although on Windows, replace the colon delmiter with a semicolon.

Link to comment
Share on other sites

  • 0

javac -cp myfile.jar:mydirectory MyClass.java

Where anything in the -cp argument (myfile.jar and mydirectory) hold any classes your MyClass.java needs to compile. Although on Windows, replace the colon delmiter with a semicolon.

what is myfile.jar?

and what would be mydirectory and myclass.java?

i am a newbie and needs to run my first hello world program?

Link to comment
Share on other sites

  • 0

I love DrJava cause it is so simple for the coding I need to do, nothing complex and fancy, just code and compile and run!

Link to comment
Share on other sites

  • 0

IntelliJ IDEA is really the best Java IDE, but if you want a free (and open source) one go for NetBeans. I can't recommend Eclipse though as it's a bit heavy on resources, certain plugins can really wreak havoc and the sheer amount of (duplicate) plugins may be confusing to beginners. The interface is also a bit cluttered and messy.

Link to comment
Share on other sites

  • 0

what is myfile.jar?

and what would be mydirectory and myclass.java?

i am a newbie and needs to run my first hello world program?

myfile.jar is either something you made with the jar command. It contains class files, resource files (such as images and config/properties files), and sometimes the source files. It is just a glorified zip file.

mydirectory would be a place that contains class files, possibly in a directory package format.

MyClass.java is the class you're compiling.

To run it, it would be:

java -cp .:myfile.jar:mydirectory MyClass

Where MyClass contains a public static void main(String[] args) method and is in the current directory (thus . being in the classpath, otherwise replace with the jar or directory it is in).

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.