LeviS LoVEr Posted January 29, 2010 Share Posted January 29, 2010 Which text editor do you use and recommend in Linux? What do i need to install to get java working so that i can compile and run programs in the Terminal? Link to comment Share on other sites More sharing options...
0 Xilo Posted January 29, 2010 Share Posted January 29, 2010 I would use the Eclipse IDE. Gives you nice features to make your life easier. All you really need though is the Java compiler executed with javac. Link to comment Share on other sites More sharing options...
0 dontocsata Posted January 29, 2010 Share Posted January 29, 2010 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 More sharing options...
0 Minchino Posted January 29, 2010 Share Posted January 29, 2010 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 More sharing options...
0 BaikenGuro Posted January 29, 2010 Share Posted January 29, 2010 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 More sharing options...
0 LeviS LoVEr Posted January 30, 2010 Author Share Posted January 30, 2010 how do we use javac at the commandline? Link to comment Share on other sites More sharing options...
0 kjordan2001 Posted January 30, 2010 Share Posted January 30, 2010 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 More sharing options...
0 LeviS LoVEr Posted January 30, 2010 Author Share Posted January 30, 2010 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 More sharing options...
0 LeviS LoVEr Posted January 30, 2010 Author Share Posted January 30, 2010 Solved.. Installed Netbeans.. it is better than eclipse Link to comment Share on other sites More sharing options...
0 andrew_f Posted January 30, 2010 Share Posted January 30, 2010 I like NetBeans myself, but Eclipse is also good! Link to comment Share on other sites More sharing options...
0 Argote Posted January 30, 2010 Share Posted January 30, 2010 Well, I guess netbeans is alright, I'm an eclipse fan myself :) Link to comment Share on other sites More sharing options...
0 +John. Subscriber¹ Posted January 31, 2010 Subscriber¹ Share Posted January 31, 2010 Notepad++, or Eclipse/Netbeans. Link to comment Share on other sites More sharing options...
0 huddy Posted January 31, 2010 Share Posted January 31, 2010 Eclipse on PC. (Netbeans on mac) Link to comment Share on other sites More sharing options...
0 Lighthalzen Posted January 31, 2010 Share Posted January 31, 2010 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 More sharing options...
0 gertin Posted January 31, 2010 Share Posted January 31, 2010 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 More sharing options...
0 kjordan2001 Posted February 1, 2010 Share Posted February 1, 2010 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 More sharing options...
Question
LeviS LoVEr
Which text editor do you use and recommend in Linux?
What do i need to install to get java working so that i can compile and run programs in the Terminal?
Link to comment
Share on other sites
15 answers to this question
Recommended Posts