What is the difference between “system32\java.exe” and “Program Files\Java\jdk1.6.0_33\bin\java.exe”?

Setting the PATHvariable is just so that you can get access to javac and the other programs and tools in the jdk bin folder.

The java.exe in \windows\system32\ is provided so that not everyone needs to set a PATH variable just to run a java program (from the command line) and selects a version (the last one installed it seems) of the installed java virtual machines (JVM) if there are more than one (publicly) installed.

See this link for further info:

http://mindprod.com/jgloss/javaexe.html#MULTIPLES

Quote:

To complicate things further the java.exe in system32 is just a dummy.
It looks in the registry and then decides which real java.exe to use.
The last JVM installed gets to be the one used, even if it is older.
To switch JVM s, you must normally reinstall the one you want.

Leave a Comment