Forums Register Login

how to run java programs in linux

+Pie Number of slices to send: Send
Hello friends

i want to work java in linux.
i have checked the option for java while installing the linux.
how to set path?
how to compile and run? are the commands are same?
in which editor, i have to work (like command prompt in windows).

please help me.

thank you
+Pie Number of slices to send: Send
>how to set path?
You needto set the bin directory of the java installation directory in your PATH. So if you installed in /opt/java, put /opt/java/bin in your PATH. You set it the same as you would for anything else you want to set in your PATH. The exact steps/syntax to do so may vary slightly depending on what shell you use. Do a Google search for setting PATH in Linux for your shell and you should get plenty of hits to help you.

>how to compile and run? are the commands are same?
Yes the commands are the same on Unix, Linux, Windows, etc. javac and java

>in which editor, i have to work (like command prompt in windows).
You can edit using any plain text editor: vi, vim, emacs, EditPad, etc. The editor can be command line or GUI based, as long as it is a plain text editor (i.e. saves files in plain text and not binary, and doesn't insert any formatting or additional markup). You will need to use a command line to compile and run from.
[ February 16, 2005: Message edited by: Mark Vedder ]
+Pie Number of slices to send: Send
You can check topic:
installation problem in linux
it is posted just 2 lines before yours.
It is information there about setting JAVA_HOME, PATH and CLASSPATH environment variables.
+Pie Number of slices to send: Send
One more thing, about editor.
I highly recommend JEdit.
It's written on java and for java, so it can run on any platform (including Linux and Windows) and has some useful features for java programming.
You can download it for free at
www.jedit.org
+Pie Number of slices to send: Send
 

Originally posted by Evgeni Shuster:
You can check topic:
installation problem in linux
it is posted just 2 lines before yours.
It is information there about setting JAVA_HOME, PATH and CLASSPATH environment variables.



Whenever a new reply is added to a thread, the whole thread moves to the top of the list. This means that telling someone to look at another thread "2 lines down" is typically not very helpful. At the time that I read this thread, it was 3 lines further down. By the time I post this message, it will be even further away. This just means that you should provide a link directly to the thread in question: check out this thread.
[ February 16, 2005: Message edited by: Layne Lund ]
Please do not shoot the fish in this barrel. But you can shoot at this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 785 times.
Similar Threads
how to implement system calls in linux through java
newbie question
java and linux
about java and linux
Run NetBeans Application in windows using terminal in linux
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 05:25:58.