Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java Path Resolution on Windows

SkottyOct 26 2010 — edited Oct 26 2010
Today 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.
This post has been answered by baftos on Oct 26 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 23 2010
Added on Oct 26 2010
2 comments
502 views