Java Path Resolution on Windows
SkottyOct 26 2010 — edited Oct 26 2010Today I was messing around with different Java versions and discovered that Java is a little more tightly integrated with Windows than I originally thought. Maybe it's just a JRE thing, and not a JDK thing. I don't know.
I have both Java 5 and Java 6 installed, and was trying to back down to Java 5 for a moment (investigating a "cannot access <whatever>.class" compiler error). I updated all of my environment variables (Windows XP) to point to the Java 5 JDK folder. But it was still using Java 6 JRE. So I moved the Java 6 JRE folder to a super-secret-haha-you-can't-get-to-it-now location. This gave me the following error:
Error: could not open 'C:\Program Files\Java\jre6\lib\i386\jvm.cfg'
Doesn't matter that all of my environment variables point to the Java 5 JDK, somehow invoking java from anywhere other than the Java 5 JDK bin folder causes some other handler to try and look up configuration from the JRE 6 folder that no longer exists.
Can anyone shed some light as to what is handling the command line call to java without letting it defer to the Java 5 JDK referenced in the path?
I guess I'll just see if I can uninstall the Java 6 JRE.