10
2
I have java installed including jre 6 and 7 on Windows 7 64-bit. When I type java -version
at the command line I get:
C:\>java -version
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)
I wanted to make jre7 the default java from the command line so I went to edit my path when I notice java isn't specified anywhere in either System Variables or User Variables (nor is there a JAVA_HOME variable either). Also running set
from the command line confirms this as the Path variable has no java directory. My java is stored in the normal C:\Program Files\Java\jre6
.
So now I'm curious how is windows finding my current java on the command line?
it looks like that C:\Windows\System32\java.exe checked first, if you haven't got this file here, java.exe runs from your JDK path – Ishikawa Yoshi – 2013-01-30T09:43:26.530