Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
hi i am new to linux and i like it so far. i am taking classes in school where i have to program in java. i have been doing it in windows in 'text pad' without no difficulty's. i cant figure out how i am suppose to do it in linux. i am running a 'knoppix' on a toshiba laptop. any advice?
I wrote a linuxanswers article on java in linux which you can find here although you can probably skip the part about installing the java 2sdk because I'm pretty sure knopix comes with it.
Use whatever text editor you like. I've used both vi and emacs for some simple programming. Only thing is, if your instructor wants to look at the source code on a windows box the line breaks are all messed up. I ended up after wrting the program having to open the source in a dos edit window and then save it without making any changes. That changed all the line breaks from unix to windows.
Linux is an excellent platform for programming, and Java is no problem either. Get the j2sdk package from Sun, install it, and then go with your favourite editor.
I use gvim (aka vim-gtk) when I write code, it offers pretty syntax highlighting and zillions of features. It also lets you choose which text file format you want to save as - MS-DOS (Windows), Unix (Linux) or Macintosh. Works a charm!
My favorite java editor is kwrite. Once if you start by saving it as a .java file it colors that text, does highlighting, and makes code boxes collapsable.
I would suggest *not* using a full-blown IDE like Eclipse. It takes more effort to learn how Eclipse works than to learn Java and it distracts attention from the programming itself.
It's true that mastering eclipse is not that easy, but once you learn the most important features of eclipse, you will no doubt realize it is extremely powerful.
As in most cases, it all depends on what you are going to do with it. Writing small programs that are not too complex? You can do that with a simple text editor. Writing complex programs? Use eclipse.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.