How do I persuade Windows to use the JDK instead of a JRE?
This question has been asked before, here and elsewhere:
How do I set the default Java installatio
I had the same issue. I have a bunch of Java versions installed and for some reason Java 1.7 was being used instead of Java 1.6, even though I specified in the path to use 1.6 (C:\jdk1.6.0_45_32\bin).
I had to move the path of the JDK I wanted to use (1.6) to be the first entry in the PATH environment variable to make sure Windows uses 1.6 instead of 1.7.
So, for example, the PATH environment variable before was:
C:\Program Files (x86);...;C:\dev\ant181\bin;C:\jdk1.6.0_45_32\bin
and after I moved the jdk to be first, it worked:
C:\jdk1.6.0_45_32\bin;C:\Program Files (x86);...;C:\dev\ant181\bin
I guess the Windows installer of Java 1.7 installed it to some other directory already in the PATH, thus getting used first instead of the specified custom PATH entry C:\jdk1.6.0_45_32\bin;