?
=?ISO-8859-1?Q?Arne_Vajh=F8j?=
David said:I've started some Java development on Windows and I have a question I
was hoping someone could tackle. It's a bit complicated, so please bear
with my explanation:
I am using the 1.5 JDK, which I installed in C:\program files\java. Also
in that directory is the 1.6 jre folder, which was installed
automatically when I hit a webpage that had a java applet in it. The 1.5
JDK directory is in my PATH environment variable, and when I run javac
from the command line, the executable file that winds up being used is
the one in the 1.5 JDK/bin directory. I've been able to confirm this.
But, when I run the java command, i.e.
java MyProgram
how is it determined whether the java.exe file being used is the one in
the JDK folder, or the one in the jre folder? Similarly, which virtual
machine file(s) are used, and how is it determined?
If you want to control it then you put the proper dir in PATH.
The installers copy java.exe to a windows dir, so if you do not
put a dir in PATH, then java.exe in a windows dir from the last install
will be used.
Arne