Reputation: 1155
i install JDK in
C:\Program Files\Java\jdk1.6.0_24
and set the variables as follow:
JAVA_HOME: C:\Program Files\Java\jdk1.6.0_24
CLASSPATH: .;C:\Program Files\Java\jdk1.6.0_24\lib;C:\Program Files\Java\jdk1.6.0_24\lib\tools.jar;
PATH: C:\Program Files\Java\jdk1.6.0_24\bin
but when i run the java -version command , the error
could not open `C:\Program Files\Java\jre6\lib\i386\jvm.cfg'
comes up. then i move the jre folder out the jdk folder to
C:\Program Files\Java\
and change the folder name to jre6 (then it has the C:\Program Files\Java\jre6 folder) , everything becomes good then .
why this is happening ? it seems to me that it is not the environment variables that are controlling the JVM's location.
Upvotes: 2
Views: 25680
Reputation: 1
I set my
JAVA_HOME: C:\Program Files\Java\jdk-14.0.2
worked fine for me.
Upvotes: 0
Reputation: 42494
If it is not the path that is controlling the location of the JRE it must be the registry:
http://java.sun.com/j2se/1.3/runtime_win32.html.
Upvotes: 2
Reputation: 365
On Windows 64 bit OS check also: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Runtime Environment
Upvotes: 0