运行Java会出现“错误:无法打开`C:\Program Files\Java \jre6 \lib \ amd64 \ jvm.cfg'" [英] Running Java gives "Error: could not open `C:\Program Files\Java\jre6\lib\amd64\jvm.cfg'"

查看:312
本文介绍了运行Java会出现“错误:无法打开`C:\Program Files\Java \jre6 \lib \ amd64 \ jvm.cfg'"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

经过多年的努力工作,我在尝试启动JVM时突然收到此消息:

After years of working OK, I'm suddenly getting this message when trying to start the JVM:

Error: could not open `C:\Program Files\Java\jre6\lib\amd64\jvm.cfg'

我尝试卸载,并收到一条消息,指出DLL丢失(未指定)
尝试重新安装,一切都无济于事。

I tried uninstalling, and got a message saying a DLL was missing (unspecified) Tried re-installing, all to no avail.

同时,当我尝试启动Scala时,我得到:

At the same time, when trying to start Scala I get:

\Java\jdk1.6.0_25\bin\java.exe was unexpected at this time.

已检查%JAVA_HOME%%path% - 两者都好

Checked %JAVA_HOME% and %path% - both OK

任何人都可以帮忙吗?

推荐答案

可能是一个稍微不同的原因,但是第二个问题出现在Win7(x64)上的scala 2.9.0.1中,虽然scala-2.9.1.final已经解决了这里提到的这个问题:

Might be a slightly different cause, but that second issue occurs for me in scala 2.9.0.1 on Win7 (x64), though scala-2.9.1.final has already resolved this issue mentioned here:

\Java\jdk1.6.0_25\bin\java.exe was unexpected at this time.

我的%JAVA_HOME%设置为路径像这样: c:\program files (x86) \ Java \ _ddk ...

My %JAVA_HOME% set to a path like this: c:\program files(x86)\Java\jdk...

请注意空格和括号。

如果更改<$ c中的第24行$ c>%SCALA_HOME%\ bin\scala.bat 来自:

if exist "%JAVA_HOME%\bin\java.exe" set _JAVACMD=%JAVA_HOME%\bin\java.exe

if exist "%JAVA_HOME%\bin\java.exe" set "_JAVACMD=%JAVA_HOME%\bin\java.exe"

一切正常。注意set命令参数周围的引号,这将在变量的值中正确地包含任何空格和'特殊'字符(例如:空格和括号)。

It works fine. Note the quotes around the set command parameters, this will properly enclose any spaces and 'special' characters (eg: spaces and parentheses) in the variable's value.

希望这有助于别人在寻找答案。

Hope this helps someone else searching for an answer.

这篇关于运行Java会出现“错误:无法打开`C:\Program Files\Java \jre6 \lib \ amd64 \ jvm.cfg'&quot;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆