问题描述
我在我的Windows 7上安装了jdk和jre。我已将JAVA_HOME设置为
C:\Program Files\Java\jdk1.6.0_23
我添加了
C:\Program Files\Java\jdk1.6.0_23\bin
到PATH。
但是java。 exe仍然指向我的jre目录,这是
C:\Program Files\Java\jre6\bin
自从我运行
java.exe -server
它抱怨
错误:在`C:\Program Files\Java\jre6\bin\server\jvm.dll'中没有`server'JVM。
任何人都可以告诉我还有什么需要设置?
既然你在windows上,java就不行了。
某些Windows目录中有一个java.exe(%windir%system32为您)
这个java.exe实际上在注册表中 HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java运行时环境
PATH不会帮助你!因为我倾向于懒惰,我删除了JRE,并创建了一个连接
到JDK。
I have both jdk and jre installed on my windows 7.
I have set the JAVA_HOME to
C:\Program Files\Java\jdk1.6.0_23
I have add
C:\Program Files\Java\jdk1.6.0_23\bin
to PATH.
but the java.exe still pointing to my jre dir, which is
C:\Program Files\Java\jre6\bin
since when I run
java.exe -server
it complains
Error: no `server' JVM at `C:\Program Files\Java\jre6\bin\server\jvm.dll'.
can anyone tell me what else do I need to set?
since you are on windows, java doesn't work like that.there is a java.exe in some windows directory (%windir% system32 for you)
This java.exe actually looks in the registry HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment
PATH won't help ya! Since I tend to get lazy I delete the JRE and create a junction
to the JDK instead.
这篇关于总是指向JRE但不是JDK的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!