我只是追加 虚拟机 C:\Program Files\Java\jre6\bin\javaw.exe

在eclipse.ini中,然后我尝试再次启动eclipse,并得到这个错误。告诉我怎么解或者链接能解出来。

这是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

谢谢你!


当前回答

请看消息框的第二行。在这里,您可以看到实际上启动了哪个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).

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 .

其他回答

我尝试了很多方法,并将-VM参数放在建议的位置。但这行不通。最后我找到了解决办法。在执行任何插件或jar之前,vm args应该放在eclipse.ini文件中。我尝试了ubuntu 18.04中最新的eclipse [Photon],它非常适合我。

-startup
-vm        
/usr/local/java/jdk1.8.0_251/bin/java.exe
plugins/org.eclipse.equinox.launcher_1.5.700.v20200207-2156.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.1100.v20190907-0426
-product
org.eclipse.epp.package.jee.product
-showsplash
org.eclipse.epp.package.common
--launcher.defaultAction
openFile
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=@user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=1.8
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms256m
-Xmx2048m
--add-modules=ALL-SYSTEM

该错误意味着Eclipse版本的JVM版本不正确。详情请点击以下链接:

http://www.ehow.com/how_4784069_terminated-exit-code-error-eclipse.html

在开始解决方案之前,让我们知道它为什么显示错误。如果你知道这个问题背后的问题,我们可以很容易地修复这个错误。

原因1:这个问题背后最常见的原因是,我们正在尝试安装不同的位版本,即64位或32位版本的软件。它可能是Eclipse或Java。

解决方案: 检查您正在运行的操作系统版本。确保您下载了相同版本的Eclipse以及相同版本的Java软件。

原因2:Eclipse.ini文件中的配置错误

解决方案: 在Eclipse.ini文件的末尾添加这一行“-vm then path of your java sdk”。例如: 虚拟机 C:\Program Files\Java\ jdk1.7.0_71 \ bin \ javaw.exe

原因3:Eclipse安装目录中存在特殊字符(#、!、@)。

解决方案: 确保没有任何特殊字符。

原因4:您在path系统变量中添加了两次JAVA路径,两次路径都不相同。

解决方案: 从path系统变量中删除一个不正确/不同的JAVA路径。

原因5:您可能使用了最新版本的Eclipse,但可能使用了错误的版本或不受支持的Java虚拟机(JVM)版本。

解决方案: 打开命令提示符,按win+R键并键入cmd并按enter键,检查您使用的java版本。现在在控制台输入Java -version命令来了解Java版本。 现在研究一下eclipse是否支持这个版本。 或 您可以打开Eclipse文件夹中的“readme”文件夹,并打开readme_eclipse.html查看它支持哪个版本。

请看消息框的第二行。在这里,您可以看到实际上启动了哪个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).

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 .

确保您使用的Eclipse和Java都是32位或64位的。

不能在32位JRE下运行64位eclipse。

java -version

Java HotSpot(TM) 64位服务器虚拟机

32位版本的JRE没有64位。