在 Linux 中启动 Eclipse 时出错:“JVM 终止。退出代码=13”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9635506/
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
Error starting Eclipse in Linux: "JVM terminated. Exit code=13"
提问by FlyingCat
I am trying to run eclipse and encounter the errors. I am using Kubuntu as my OS and when I typed java -version
in terminal I got 'java version "1.6.0_23"'. I have openJDK installed but I am not sure what can I do next. Any thoughts? Thanks.
我正在尝试运行 eclipse 并遇到错误。我使用 Kubuntu 作为我的操作系统,当我java -version
在终端中输入时,我得到了“java 版本“1.6.0_23””。我已经安装了 openJDK,但我不确定下一步该怎么做。有什么想法吗?谢谢。
ERROR:
错误:
JVM terminated. Exit code=13
/usr/bin/java
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=256m
-Xms40m
-Xmx384m
-jar /home/lucky/Downloads/eclipse//plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
-os linux
-ws gtk
-arch x86
-showsplash
- launcher /home/lucky/Downloads/eclipse/eclipse
-name Eclipse
--launcher.library /home/lucky/Downloads/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.2.R36x_v20101019_1345/eclipse_1310.so
-startup /home/lucky/Downloads/eclipse//plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
-exitdata 5cf8058
-product org.eclipse.epp.package.php.product
-vm /usr/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=256m
-Xms40m
-Xmx384m
-jar /home/lucky/Downloads/eclipse//plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
My eclipse.ini
我的eclipse.ini
-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.2.R36x_v20101019_1345
-product
org.eclipse.epp.package.php.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=256m
-Xms40m
-Xmx384m
采纳答案by MartinK
Looking at the paths in the error it seems that you are not using eclipse from the ubuntu repositories (that's fine imo).
查看错误中的路径,您似乎没有使用 ubuntu 存储库中的 eclipse(这很好 imo)。
Check if the jvm is 64 or 32 bit.
java -version
will tell you. If you find this is a 64-bit jvm then go back to eclipse.org and download a eclipse version for 64-bit. You have eclipse for a 32-bit jvm. See your error message where it says-arch x86
Try to start eclipse from a shell using the
-vm
parameter. On ubuntu you can find the installed jre/jdk's under/var/lib/jvm/
. E.g.:
检查 jvm 是 64 位还是 32 位。
java -version
会告诉你。如果您发现这是 64 位 jvm,请返回 eclipse.org 并下载64 位eclipse 版本。您有 32 位 jvm 的 eclipse。在它说的地方查看您的错误消息-arch x86
尝试使用
-vm
参数从 shell 启动 eclipse 。在 ubuntu 上,您可以在/var/lib/jvm/
. 例如:
./eclipse -vm /var/lib/jvm/sun-java6-jdk/bin
./eclipse -vm /var/lib/jvm/sun-java6-jdk/bin
You could add this parameter to your eclipse.ini file.
您可以将此参数添加到 eclipse.ini 文件中。
Helps?
有帮助吗?
This could be of interest as well: Eclipse starting error of JVM terminated. Exit code=13 after upgrading Ubuntu updates
回答by E-Riz
Specify the JVM you want to use in your eclipse.ini file, as described in http://wiki.eclipse.org/Eclipse.ini
指定要在 eclipse.ini 文件中使用的 JVM,如http://wiki.eclipse.org/Eclipse.ini 中所述
I'd recommend using the JDK from Oracle; I'm not sure the current state of compatibility between Eclipse and OpenJDK.
我建议使用 Oracle 的 JDK;我不确定 Eclipse 和 OpenJDK 之间的当前兼容性状态。
回答by Don Kartacs
This might sound a little odd but I have stumbled upon the same problem (StS 3.2.2 on Juno 4.2.2 with Java 7 u25 both 64 bit on win7) and nothing seemed to work, then I moved my sts out of the directory I originally installed it (d:#sts\springsource\sts-3.2.0.RELEASE) to (d:\springsource\sts-3.2.0.RELEASE), and now it works. I kept it in both places and if I want to start it from its original location it promptly crashes with exit code 13, if I start it from the new place it works just fine.
这听起来可能有点奇怪,但我偶然发现了同样的问题(Juno 4.2.2 上的 StS 3.2.2,Win7 上的 Java 7 u25 均为 64 位)并且似乎没有任何效果,然后我将我的 sts 移出了我的目录最初将它 (d:#sts\springsource\sts-3.2.0.RELEASE) 安装到 (d:\springsource\sts-3.2.0.RELEASE),现在它可以工作了。我把它放在两个地方,如果我想从它的原始位置启动它,它会立即崩溃并显示退出代码 13,如果我从新位置启动它,它工作得很好。
So it might be that eclipse does not like hash marks, or it was "too far away" from root and some of the files paths-es went beyond 256 char. (Nonetheless its quite odd the get exit code 13 since in my case it had nothing to do with non-matching versions)
所以可能是eclipse不喜欢哈希标记,或者它离root“太远”并且一些文件path-es超过了256个字符。(尽管如此, get 退出代码 13 很奇怪,因为在我的情况下,它与不匹配的版本无关)
回答by elemer82
I had the same error.
我有同样的错误。
I got through with the following:
我解决了以下问题:
which java
It gave me :/usr/local/java/jre1.7.0_25/bin/java
它给了我:/usr/local/java/jre1.7.0_25/bin/java
I went to the folder where eclipse was located (~/Developer/adt-bundle-linux-x86_64-20140624/eclipse/ in my case )
我去了eclipse所在的文件夹(~/Developer/adt-bundle-linux-x86_64-20140624/eclipse/在我的情况下)
cd ~/Developer/adt-bundle-linux-x86_64-20140624/eclipse/
Then
然后
./eclipse -vm /usr/local/java/jre1.7.0_25/bin
You can make this permanent by editing the eclipse.ini file: Right after OpenFile I inserted 2 lines containing:
您可以通过编辑 eclipse.ini 文件使其永久化:在 OpenFile 之后,我插入了 2 行,其中包含:
-vm
/usr/local/java/jre1.7.0_25/bin/java
The second line being the output from the which java
command.
第二行是which java
命令的输出。
Now Eclipse loads for me but it misbehaves, hopefully not related.
现在 Eclipse 为我加载但它行为不端,希望不相关。
回答by Empty_Mind
I have found solution for errors 13 and 1 in following video:
我在以下视频中找到了错误 13 和 1 的解决方案:
Both errors are fixed by editing eclipse.ini in eclipse directory.
这两个错误都通过编辑 eclipse 目录中的 eclipse.ini 来修复。
Error 13 is fixed by adding complete path to javaw. In my case it is:
通过向 javaw 添加完整路径来修复错误 13。就我而言,它是:
-vm
c:\Program Files\Java\jdk1.8.0_45\bin\javaw.exe
Error 1 is caused by setting arguments for virtual machine before setting vm. itself. This means two lines we just added must be before the
错误 1 是由在设置 vm 之前设置虚拟机参数引起的。本身。这意味着我们刚刚添加的两行必须在
-vmargs
line.
线。
Done.
完毕。
回答by Hamid
I had this issue on my windows 8.1 machine. All the suggestions didn't fix my issue. I then thought about the root cause. I believed it was caused by degrading from JDK-9 to JDK-8. I recently uninstalled JDK-9. I went and checked the Environment Variable-->Path and it contained another Java reference of "C:\ProgramData\Oracle\Java\javapath".
我在 Windows 8.1 机器上遇到了这个问题。所有的建议都没有解决我的问题。然后我想到了根本原因。我认为这是由 JDK-9 降级到 JDK-8 引起的。我最近卸载了 JDK-9。我去检查了 Environment Variable-->Path ,它包含另一个 Java 引用“ C:\ProgramData\Oracle\Java\javapath”。
I simply removed this extra "C:\ProgramData\Oracle\Java\javapath" from Path(environment variable), and My Eclipse worked.
我只是从路径(环境变量)中删除了这个额外的“C:\ProgramData\Oracle\Java\javapath”,并且我的 Eclipse 工作了。
I hope this helps others.
我希望这对其他人有帮助。