无法运行 Eclipse;JVM 终止。退出代码=13
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4945178/
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
Cannot run Eclipse; JVM terminated. Exit code=13
提问by Prince OfThief
I just append -vm C:\Program Files\Java\jre6\bin\javaw.exe
我只是附加 -vm C:\Program Files\Java\jre6\bin\javaw.exe
in eclipse.ini then I try to start eclipse again and got this error. Give me how to solve or link that actually solve it.
在 eclipse.ini 然后我尝试再次启动 eclipse 并收到此错误。给我如何解决或链接实际解决它。
this is my eclipse.ini
这是我的 eclipse.ini
-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.1.R36x_v20100810
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize 256m
--launcher.defaultAction
openFile
-vm
C:\Program Files\Java\jre6\bin\javaw.exe
-vmargs
-Xms40m
-Xmx384m
Thank you
谢谢
采纳答案by mecsco
It may just be the way the error shows (and not how it is written in the eclipse.ini file), but there is text in Eclipse.ini (Specifying the JVM)that says the following:
这可能只是错误显示的方式(而不是它在 eclipse.ini 文件中的编写方式),但Eclipse.ini(指定 JVM)中有如下文本:
- The -vm option and its value (the path) must be on separate lines.
- The value must be the full absolute path to the Java executable, not just to the Java home directory.
- The -vm option must occur before the -vmargs option, since everything after -vmargs is passed directly to the JVM
- -vm 选项及其值(路径)必须在不同的行中。
- 该值必须是 Java 可执行文件的完整绝对路径,而不仅仅是 Java 主目录。
- -vm 选项必须出现在 -vmargs 选项之前,因为 -vmargs 之后的所有内容都直接传递给 JVM
回答by jmagder
I had the same error when configuring eclipse.ini to use JRE6. Turns out I caused this error by incorrectly configuring eclipse to use the 64 bit JVM while running a 32 bit version of eclipse 3.7.
我在配置 eclipse.ini 以使用 JRE6 时遇到了同样的错误。结果是我在运行 32 位版本的 eclipse 3.7 时错误地配置 eclipse 以使用 64 位 JVM,从而导致了这个错误。
The correct configuration required the eclipse.ini -vm argumument to use "C:/Program Files (x86)/" instead of "C:/Program Files/".
正确的配置要求 eclipse.ini -vm 参数使用“C:/Program Files (x86)/”而不是“C:/Program Files/”。
Make sure that the JVM version (32/64 bit) you use matches the eclipse version (32/64 bit).
确保您使用的 JVM 版本(32/64 位)与 Eclipse 版本(32/64 位)匹配。
回答by Heri
Look at the second line of the message box. There you can see which java runtime in fact is started. Mine was suddenly C:\ProgramData\Oracle\Java\javapath\javaw.exe. This happened after I have installed a "chrome java updater" (Chrome browser moaned: 'your java is outdated, you have to update...').
查看消息框的第二行。在那里您可以看到实际上启动了哪个 java 运行时。我的突然变成了 C:\ProgramData\Oracle\Java\javapath\javaw.exe。这是在我安装了“chrome java 更新程序”之后发生的(Chrome 浏览器抱怨说:“你的 java 已经过时了,你必须更新......”)。
Before this "chrome java update" my eclipse (luna jee x64) started without error. Looking closer to the background I detected following: the chrome java updater (notabene started from an Oracle site) added C:\ProgramData\Oracle\Java\javapath in front of the env var PATH. It contains three symbolic links to the newest java 8 JRE installation in (x86) program folder -> hence to a 32 bit java JRE. Oracle replaces with Java8 the old technique having the symlinks in system32 (64bit) resp. SysWOW64 (32bit).
在此“chrome java 更新”之前,我的日食(luna jee x64)启动时没有出现错误。仔细观察我检测到的背景:chrome java 更新程序(notabene 从 Oracle 站点启动)在 env var PATH 前面添加了 C:\ProgramData\Oracle\Java\javapath。它包含指向 (x86) 程序文件夹中最新 java 8 JRE 安装的三个符号链接 -> 因此指向 32 位 java JRE。Oracle 用 Java8 替换了在 system32(64 位)和 64 位中具有符号链接的旧技术。SysWOW64(32 位)。
Meanwhile I learned. Whatever java installer you have executed last (the *.exe) leads windows to remember that java flavour (32b or 64b), with the result that after an update the links in C:\ProgramData\Oracle\Java\javapath point to a java installation of the remembered flavour. If you have a 64b eclipse installation and encounter the described error: just re-install the newest 64b JDK. After that the java updates do no more link to a 32b version. And eclipse 64b will start correctly without the entry in eclipse.ini .
同时我学会了。无论您最后执行的是什么 Java 安装程序(*.exe),Windows 都会记住 Java 风格(32b 或 64b),结果是更新后 C:\ProgramData\Oracle\Java\javapath 中的链接指向一个 java安装记住的味道。如果您安装了 64b eclipse 并遇到所描述的错误:只需重新安装最新的 64b JDK。之后,java 更新不再链接到 32b 版本。eclipse 64b 将在没有 eclipse.ini 条目的情况下正确启动。
回答by junaidp
You need to check if your PC has a 64-bit or 32-bit operating system, then same goes for your JDK (64-bit/32-bit) and also for Eclipse (64-bit/32-bit).
您需要检查您的 PC 是否具有 64 位或 32 位操作系统,那么您的 JDK(64 位/32 位)和 Eclipse(64 位/32 位)也是如此。
Make sure they are all the same; if not, you need to download the one that matches your bitness.
确保它们都相同;如果没有,您需要下载与您的位数相匹配的那个。
回答by Sireesh Yarlagadda
For Eclipse:
对于日食:
Added this two lines in eclipse.ini
在 eclipse.ini 中添加了这两行
Second line represents the JDK location of the javaw.exe file.
第二行表示 javaw.exe 文件的 JDK 位置。
-vm
C:\Program Files\Java\jdk1.7.0_60\bin\javaw.exe
-vm
C:\Program Files\Java\jdk1.7.0_60\bin\javaw.exe
Note: place -vm lines before -vmargs, otherwise default location is taken.
注意:将 -vm 行放在 -vmargs 之前,否则采用默认位置。
For STS
对于 STS
Change the same as above in STS.ini
在 STS.ini 中更改与上面相同的内容
回答by jakobengblom2
I just hit this too. Turns out that at least for me, this was due to trying to use a win64 version of the JRE with a win32 Eclipse. I seems that win32 Eclipse requires a win32 Java (what is called -586 in the list of Java installers from Oracle/Sun).
我也刚打了这个。事实证明,至少对我来说,这是由于尝试在 win32 Eclipse 中使用 win64 版本的 JRE。我似乎 win32 Eclipse 需要一个 win32 Java(在 Oracle/Sun 的 Java 安装程序列表中称为 -586)。
The reason I was using both is that I was trying to pinpoint a bug that only manifested itself in 64-bit Eclipse, so I needed a 32-bit to compare to.
我同时使用两者的原因是我试图找出一个只在 64 位 Eclipse 中出现的错误,所以我需要一个 32 位来进行比较。
Once I installed BOTH the "x64" (win64) and "i586" (win32) versions of the JRE on my machine, things work fine and no error 13. You can apparently have both installed at the same time.
一旦我在我的机器上安装了 JRE 的“x64”(win64) 和“i586”(win32) 版本,一切正常,没有错误 13。显然您可以同时安装这两个版本。
回答by Dan Grossman
The error means it's the wrong JVM version for that version of Eclipse. The link has more details:
该错误意味着该版本的 Eclipse 的 JVM 版本错误。该链接有更多详细信息:
http://www.ehow.com/how_4784069_terminated-exit-code-error-eclipse.html
http://www.ehow.com/how_4784069_terminated-exit-code-error-eclipse.html
回答by Neo
Make sure the Eclipse and the Java that you are using are both either 32-bit or 64-bit.
确保您使用的 Eclipse 和 Java 都是 32 位或 64 位。
You cannot run 64-bit eclipse with 32-bit JRE.
您不能使用 32 位 JRE 运行 64 位 eclipse。
java -version
Java HotSpot(TM) 64-Bit
Server VM
Java HotSpot(TM)64-Bit
服务器虚拟机
The 32 bit version JRE will not have 64-Bit in it.
32 位版本的 JRE 中将没有 64 位。
回答by Sam7
I just had the same issue, and spend about an hour trying to solve the problem. In the end it was a '#' character in the path.
我刚刚遇到了同样的问题,并花了大约一个小时试图解决这个问题。最后它是路径中的“ #”字符。
So I renamed "C:\# IDE\eclipse 3.7\" to "C:\+ IDE\eclipse 3.7\" and that solved the problem.
所以我将“C:\#IDE\eclipse 3.7\”重命名为“C:\+ IDE\eclipse 3.7\”并解决了这个问题。
回答by Rips
Recently I faced same issue.My version of eclipse didnt support java version 8.
最近我遇到了同样的问题。我的 eclipse 版本不支持 java 版本 8。
I had accidently installed jre 8 on my machine which automatically updated my PATH variable by appending "C:\ProgramData\Oracle\Java\javapath" in the beginging which led eclipse to pick up this version(and ignore the manually added 1.6 version which came later in order)and crash with exit code 13.
我不小心在我的机器上安装了 jre 8,它通过在开始时附加“C:\稍后按顺序)并以退出代码 13 崩溃。
I just removed this string from the path so which led system to pick up my older version and eclipse started just fine.
我刚刚从路径中删除了这个字符串,所以这导致系统选择我的旧版本并且 eclipse 启动得很好。