On Windows, the JRE installs the java executable in the Windows directory, which should be the first java in your path. This is just a shell that searches the Windows registry to find the Java home directory (should be "% SystemDrive% \ Program Files \ Java \ jre6" for Java 6) and works using libraries there.
Run% SystemRoot% \ system32 \ java -version and see what you get. If it's Java 6, you have entries in your path up to% SystemRoot% \ system32 (which really should be the first). Either correct the% PATH% variable, or you must be explicit whenever you want to run this version of Java.
If starting this instance of java does not report Java 6, it is not installed (correctly). Uninstall and try installing again.
If you are having problems due to PATH, it is due to the fact that you or some software that you installed has monkeys with it; I recommend using the default value that system32 should have first. Everything works fine if the default values ββare used.
In addition,% JAVA_HOME% is not used by the JRE itself. Some common Java applications, such as tomcat and ant, correspond to the% JAVA_HOME% setting, so perhaps yuicompressor as well. But this is a de facto agreement, not a standard.
erickson
source share