开发者

can't find JRE in the JDK

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.


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.


On Windows 64 bit OS check also: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Runtime Environment


I set my

JAVA_HOME: C:\Program Files\Java\jdk-14.0.2

worked fine for me.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜