Run
where java
at your command prompt.
On my system, it printed something quite unexpected:
C:\Users\Mikel>where java
C:\Windows\System32\java.exe
Verifying there really is a Java there:
C:\Users\Mikel>c:\windows\system32\java.exe -version
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
So one solution is to ensure your preferred Java is in the PATH before C:\Windows\System32
.
I also tried looking in the Java control panel to see if it manages the version in C:\Windows\System32
, but I could only view the settings, not edit them. Maybe it works for you?
I don't see any references to jdk 6 on the PATH variable either. Only Java 5 X) – Jeune – 2011-01-25T19:29:44.017
It's an example, the procedure is still the same.. – John T – 2011-01-25T19:31:30.753