Java Eclipse IDE 无法在 JVM 终止的情况下启动。退出代码=-1

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2087004/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 03:24:16  来源:igfitidea点击:

Eclipse IDE fail to launch with JVM Terminated. Exit code=-1

javaeclipseidejvm

提问by blissfool

I was having an issue with Eclipse IDE failing to launch with following error message: "JVM Terminated. Exit code=-1"

我遇到了 Eclipse IDE 无法启动的问题,并显示以下错误消息:“JVM 终止。退出代码=-1”

After some googling, I've semi-unintentionally found the solution and was able to get the IDE to launch correctly. What I did was to set -Xmx JVM argument in eclipse.ini to a value that is lower than the default value specified (-Xmx512m). Although I was able to get the IDE to launch, I was curious as to why it was happening and why this solution worked.

经过一番谷歌搜索后,我半无意地找到了解决方案,并且能够让 IDE 正确启动。我所做的是将 eclipse.ini 中的 -Xmx JVM 参数设置为低于指定的默认值 (-Xmx512m) 的值。虽然我能够启动 IDE,但我很好奇它为什么会发生以及为什么这个解决方案有效。

Here are some environment info:
Eclipse IDE:eclipse-rcp-galileo-SR1-win32
JVM:Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
Physical Memory:2GB

以下是一些环境信息:
Eclipse IDE:eclipse-rcp-galileo-SR1-win32
JVM:Java(TM) SE 运行时环境(构建 1.6.0_10-b33)
物理内存:2GB

Available memory at launch time for >1GB.

启动时可用内存大于 1GB。

Initially, I changed the value to 256m and Eclipse launch correctly and after some experiment I found out that it launches correctly until it is set to 348m. However, once the value is set to 349m, I get a dialog with the above error message. The full message is:

最初,我将值更改为 256m 并且 Eclipse 正确启动,经过一些实验我发现它可以正确启动,直到它设置为 348m。但是,一旦将该值设置为 349m,我就会收到一个包含上述错误消息的对话框。完整的信息是:

JVM terminated. Exit code=-1
-Dosgi.requiredJavaVersion=1.5
-Xmx349m
-XX:MaxPermSize=256m
-Djava.class.path=C:\tools\eclipse-rcp-galileo-SR1-win32\eclipse\plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
-os win32
-ws win32
-arch x86
-showsplash C:\tools\eclipse-rcp-galileo-SR1-win32\eclipse\plugins\org.eclipse.platform_3.3.201.v200909170800\splash.bmp
-launcher C:\tools\eclipse-rcp-galileo-SR1-win32\eclipse\eclipse.exe
-name Eclipse
--launcher.library C:\tools\eclipse-rcp-galileo-SR1-win32\eclipse\plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519\eclipse_1206.dll
-startup C:\tools\eclipse-rcp-galileo-SR1-win32\eclipse\plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
-product org.eclipse.epp.package.rcp.product
-vm c:\tools\java6\bin\..\jre\bin\client\jvm.dll
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xmx349m
-XX:MaxPermSize=256m
-Djava.class.path=C:\tools\eclipse-rcp-galileo-SR1-win32\eclipse\plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar

Does anyone have any idea or clue as to why this may be happening??

有没有人知道为什么会发生这种情况?

Thank you.

谢谢你。

回答by Markus Lausberg

Try out this one

试试这个

C:\dev\IDE\eclipse332\eclipse.exe -vm C:\dev\JDK\j2sdk1.4.2_06\bin\javaw.exe -vmargs -Xmx1024M -Xms512M

C:\dev\IDE\eclipse332\eclipse.exe -vm C:\dev\JDK\j2sdk1.4.2_06\bin\javaw.exe -vmargs -Xmx1024M -Xms512M

I also had problems with more memory. But this was working for me. I am sorry, but i do not know how to configure it correctly.

我也遇到了更多内存问题。但这对我有用。我很抱歉,但我不知道如何正确配置它。

回答by Andreas Dolk

This blogmentions a similiar problem and provides a solution. And he's referring to this forum threaddiscussing the same exit code -1 issue with eclipse.

博客提到了一个类似的问题并提供了解决方案。他指的是这个论坛主题讨论与 Eclipse 相同的退出代码 -1 问题。

(Looks like I'm happy that my eclipse didn't crash like this .. yet)

(看起来我很高兴我的日食没有像这样崩溃......还没有)

回答by kakopappa

I had the same problem. You must be running 64-bit Windows. For some reason Eclipse is looking for 32-bit Java Run time so you need to download and install 32 bit version. Also make sure Path Variable in Environment variables is set to 32 Bit Path

我有同样的问题。您必须运行 64 位 Windows。出于某种原因,Eclipse 正在寻找 32 位 Java 运行时,因此您需要下载并安装 32 位版本。还要确保环境变量中的路径变量设置为 32 位路径

回答by Eric

I use the following to start eclipse. It's working:

我使用以下内容来启动 eclipse。它正在工作:

E:\tools\eclipseR30\eclipse.exe -data E:\workspaces\r30 -vm C:\Java\jdk1.5.0_16\jre\bin\javaw.exe -jvmargs –Xms512M –Xmx512M

Or you can add -vm C:\Java\jdk1.5.0_16\jre\bin\javaw.exein eclipse.ini.

或者您可以-vm C:\Java\jdk1.5.0_16\jre\bin\javaw.exe在 eclipse.ini 中添加。

回答by kakopappa

I managed to fix this by installing 32-bit JRE. Looks like eclipse is looking for 32-bit version

我通过安装 32 位 JRE 设法解决了这个问题。看起来 eclipse 正在寻找 32 位版本

回答by joe

i got this JVM terminated. Exit code=-1 message to, after alot of google search i found out that my eclipse was only for 32 bit(europe 3.3.2) and i had windows 64 bit, so the path to my jdk was to my 64 bit programfiles folder, not to programfile(x86) folder and i changed that in my eclipse.ini to:

我终止了这个JVM。退出代码=-1 消息,经过大量谷歌搜索后,我发现我的 Eclipse 仅适用于 32 位(欧洲 3.3.2)并且我有 64 位的 Windows,所以我的 jdk 的路径是我的 64 位程序文件文件夹,而不是 programfile(x86) 文件夹,我在 eclipse.ini 中将其更改为:

-showsplash org.eclipse.platform --launcher.XXMaxPermSize 256M -vm C:\Program Files (x86)\Java\jdk1.7.0\jre\bin\server\jvm.dll -vmargs -Dosgi.requiredJavaVersion=1.7 -Xms40m -Xmx256m

-showsplash org.eclipse.platform --launcher.XXMaxPermSize 256M -vm C:\Program Files (x86)\Java\jdk1.7.0\jre\bin\server\jvm.dll -vmargs -Dosgi.requiredJavaVersion=1.7 -Xms40m - Xmx256米

i dont know if its ontopic but if someone get the same message i hope this helps:)

我不知道它是否是主题,但如果有人收到相同的消息,我希望这会有所帮助:)

回答by Vishwanatha

I was also getting the same error, you can fix it by following the below steps.

我也遇到了同样的错误,您可以按照以下步骤进行修复。

  1. Open the 'eclipse.ini' file in the notepad
  2. Search for '-vm' if found change the value as '-vm C:\Program Files\Java\jdk1.6.0_23\jre\bin\javaw.exe' (depending on your java installation path)
  3. if you didn't find '-vm' in the 'eclipse.ini' file, then add the '-vm C:\Program Files\Java\jdk1.6.0_23\jre\bin\javaw.exe', anywhere I pasted under the '-showsplash'.
  4. launch the eclipse, by clicking on the 'eclipse.exe'.
  1. 在记事本中打开“eclipse.ini”文件
  2. 搜索 '-vm' 如果找到将值更改为 '-vm C:\Program Files\Java\jdk1.6.0_23\jre\bin\javaw.exe'(取决于您的 java 安装路径)
  3. 如果在“eclipse.ini”文件中没有找到“-vm”,则在我粘贴的任何位置添加“-vm C:\Program Files\Java\jdk1.6.0_23\jre\bin\javaw.exe”在“-showsplash”下。
  4. 通过单击“eclipse.exe”启动 eclipse。

Let me know if still not working!

如果仍然无法正常工作,请告诉我!

回答by Justin

I managed to launch studio by editing iniand reducing XXMaxPermSizeto 128m.

我设法通过编辑ini和减少XXMaxPermSize到 128m来启动工作室。

--launcher.XXMaxPermSize
128m
--launcher.defaultAction
openFile
-vmargs
-Xms512m
-Xmx1024m

回答by James

It looks JVM problem. You can try to download JRockit and set your env variable to JRockit JVM. It should fix the problem.

看起来是JVM问题。您可以尝试下载 JRockit 并将您的 env 变量设置为 JRockit JVM。它应该解决问题。

回答by BiGXERO

I downloaded the latest visual studio redistributable package at http://www.microsoft.com/en-us/download/details.aspx?id=5555and it seems to resolve the issue. I DL both the 32bit and 64bit for what it was worth.

我在http://www.microsoft.com/en-us/download/details.aspx?id=5555下载了最新的 Visual Studio 可再发行包,它似乎解决了这个问题。我 DL 32 位和 64 位都值得。