Eclipse 在 Windows 7 中启动时出错
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4587518/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse's error on startup in windows 7
提问by ExiRe
Good day.
再会。
I decided to learn Java. I installed JDK and downloaded eclipse-java-helios-SR1-win32
for windows 7.
我决定学习Java。我安装了JDK并下载eclipse-java-helios-SR1-win32
了Windows 7。
But i can't launch eclipse because i always receive the message:
但我无法启动 eclipse,因为我总是收到消息:
Error: couldn't find Java SE Runtime Environment
I tried to reinstall the JDK but installer gave me such message:
我试图重新安装 JDK,但安装程序给了我这样的消息:
Error 1723, There is a problem with this Windows Installer package.
A DLL required for this install to complete couldn't be run."
At least here is information that eclipse gave to me:
至少这里是 eclipse 给我的信息:
Java was started but returned exit code=2
C:\Windows\system32\javaw.exe
-Dosgi.requiredJavaVersion =1.5 -Xms40m
-Xmx334m
-XX:MaxPermSize=256m
-jar C:\eclipse\plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
-os Win32
-ws Win32
-arch x86
-showsplash
-launcher C:\eclipse\eclipse.exe
-name Eclipse
--launcher.library
C:\eclipse\plugins/org.eclipse.equinox.Iauncher.win32.win32.x86_1.1.1.R36x_v2010
0810\eclipse_1309.dll
-startup C:\eclipse\pIugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar -exitdata 1760_50
-product org.eclipse.epp.package.java.product -vm C:\Windows\system32\javaw.exe -vmargs
-Dosgi.requiredJavaVersion=1.5 -Xms40m
-Xmx384m
-XX:MaxPermSize=256m
-jar C:\eclipse\plugins/org.eclipse.equinox.launcher_1.1.0.v20100507jar
Here is a picture of the error. I suppose that i could make few mistakes in the log.
这是错误的图片。我想我可以在日志中犯一些错误。
回答by VonC
Change your eclipse.ini
(right beside the eclipse.exe
) in order to:
更改您的eclipse.ini
(在 旁边eclipse.exe
)以便:
- specify a full JVM path (
-vm
argument:-vm C:/Prog/Java/jdk1.6.0_21/jre/bin/server/jvm.dll
for instance). Don't use the one inC:\Windows\System32
. - not specify the jar used for the launcher.library
- 指定完整的 JVM 路径(例如
-vm
参数-vm C:/Prog/Java/jdk1.6.0_21/jre/bin/server/jvm.dll
:)。不要使用C:\Windows\System32
. - 不指定用于 launcher.library 的 jar
See this eclipse.ini
as an example.
见这个eclipse.ini
作为一个例子。
回答by mbonness
My employer also pushed out a Java 7 update to my machine after which I started getting the same Eclipse error on startup. I fixed it by removing the following files:
我的雇主还向我的机器推送了 Java 7 更新,之后我开始在启动时遇到相同的 Eclipse 错误。我通过删除以下文件来修复它:
- C:\Windows\System32\java.exe
- C:\Windows\System32\javaw.exe
- C:\Windows\System32\javaws.exe
- C:\Windows\System32\java.exe
- C:\Windows\System32\javaw.exe
- C:\Windows\System32\javaws.exe
Eclipse starts up successfully now.
Eclipse 现在成功启动。
回答by erhanasikoglu
-vm
C:/Java/jre/bin/server/jvm.dll
you should specify jvm.dll file path to any bundle of the eclipse .ini file (eclipse.ini,sts.ini)
您应该指定 eclipse .ini 文件(eclipse.ini、sts.ini)的任何包的 jvm.dll 文件路径
回答by user2296771
I have tried all of the tricks stated above and nothing was able to resolve my problem. Changing the path way, registry being corrupted, few dlls weren't able to be deleted and so on and on... I used Fixit it delete whatever I saw with the name JAVA. I tried installing GRE/JVM separately, nothing worked what so ever.
我已经尝试了上述所有技巧,但没有任何方法可以解决我的问题。改变路径,注册表被破坏,几个dll无法被删除等等......我用Fixit它删除了我看到的名字为JAVA的任何东西。我尝试单独安装 GRE/JVM,但没有任何效果。
Solution..
解决方案..
http://www.java.com/en/download/help/windows_offline_download.xml
http://www.java.com/en/download/help/windows_offline_download.xml
Use offline install of JAVA or some people call it silently install JAVA. This fixed my problem that I couldn't fix in two days. After this I was able to install eclipse without getting any pathway error message, or dll related messages.
使用 JAVA 离线安装或有人称之为静默安装 JAVA。这解决了我在两天内无法解决的问题。在此之后,我能够安装 eclipse 而不会收到任何路径错误消息或与 dll 相关的消息。
回答by Toby
I had the same issue after a Java update provided by my employer. Everything was working just fine and then the update arrived. Suddenly Eclipse Helios Service Release 2 did not launch giving me the same error msg that you got.
在我的雇主提供 Java 更新后,我遇到了同样的问题。一切正常,然后更新到了。突然 Eclipse Helios Service Release 2 没有启动,给我和你一样的错误消息。
The solution was to download the latest JRE from www.java.com, JRE 1.6 update 30. I did not have to do any changes to eclipse.ini at all.
解决方案是从 www.java.com 下载最新的 JRE,JRE 1.6 update 30。我根本不需要对 eclipse.ini 做任何更改。
Hope this will help someone who is experiencing the same issue. :-)
希望这会帮助遇到同样问题的人。:-)
回答by Scoobydoo25
I had the same problem as of "ExiRe" and tried modifying the eclipse.ini, but to no avail. Then by following the eclipse logs I found it's trying to use the default java exes in System32. I deleted the three Java files from System32 folder, specified the -vm args in eclipse.ini and started Eclipse again.
我遇到了与“ExiRe”相同的问题,并尝试修改 eclipse.ini,但无济于事。然后通过跟踪 eclipse 日志,我发现它正在尝试使用 System32 中的默认 java exe。我从 System32 文件夹中删除了三个 Java 文件,在 eclipse.ini 中指定了 -vm args 并再次启动了 Eclipse。
eclipse started fine on the 32 bit combi(both java and eclipse 32 bit versions) but not on the 64 bit combi.
eclipse 在 32 位组合(java 和 eclipse 32 位版本)上启动良好,但在 64 位组合上则不行。
So far I'm using 32 bit combi. If anyone could figure out how to get it work on 64 bit combi please respond.
到目前为止,我使用的是 32 位组合。如果有人能弄清楚如何让它在 64 位组合上工作,请回复。
回答by endless
I got the same issue after installing jdk 7 update 9. Something must be wrong with this installation. I removed java/javaw/javaws exe files (as suggested in the above comment) from windows\system32 and eclipse started fine. Reinstalling JRE did not help.
安装 jdk 7 update 9 后我遇到了同样的问题。这个安装一定有问题。我从 windows\system32 中删除了 java/javaw/javaws exe 文件(如上面评论中所建议的),eclipse 开始正常。重新安装 JRE 没有帮助。
回答by carolina
I removed the system32 java files and then copied the new jre folder from the new java jdk 7 to the folder for eclipse
我删除了system32 java文件,然后将新的jre文件夹从新的java jdk 7复制到eclipse的文件夹中
回答by user3375993
I've had the same issue and it took me 2 days to fix it. I removed java.exe
and javaw.exe
from Windows/System32 folder.
Eclipse has just opened, I'm happy to see my favorite IDE again.
我遇到了同样的问题,我花了 2 天的时间来解决它。我从 Windows/System32 文件夹中删除了java.exe
和javaw.exe
。Eclipse 刚刚打开,我很高兴再次看到我最喜欢的 IDE。