Save and Compile and Run in Anywhere

K

ktaf

Hi
Every time that i write a java application , i should
save it in \jdk1.5\bin directory to compile and run it.
How i can save and compile and run it in any location
in command line.
 
R

Roland de Ruiter

Hi
Every time that i write a java application , i should
save it in \jdk1.5\bin directory to compile and run it.
How i can save and compile and run it in any location
in command line.
Update the PATH environment variable; in the command line window, type
set PATH=C:\jdk1.5\bin;%PATH%

To add the JDK bin directory to the PATH variable permanently (so you
don't have to update it each time you start a new command line window),
see <http://java.sun.com/j2se/1.5.0/install-windows.html#Environment>

The following section in the Java tutorial also explains how to compile
Java programs:
<http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html#win32-2b>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,690
Members
48,796
Latest member
Greg L.

Latest Threads

Top