我只是追加 虚拟机 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 .

其他回答

In my opinion the most answers here regarding different architectures of Eclipse and Java are simply wrong and this can be easily checked using e.g. Process Monitor under Windows. The -vm option is there to run a specific version of java and the point of it is, that the configured process is started and runs all the Java code on its own, that's why you configure up to java.exe. In that case you DON'T need to have the same architecture for Eclipse and Java, but can happily mix both 32 Bit and 64 Bit. You only CAN'T mix both, if you DON'T use -vm, but let Eclipse load Java natively into its own process using jvm.dll and such. That latter behavior is Eclipse's default, but not the case anymore if you properly configure -vm in eclipse.ini.

如果你不相信我,你可以自己用Eclipse和Java的不同体系结构做一些测试,并正确地配置-vm。最后,这正是提问者在对公认答案的评论中所描述的:

不能运行Eclipse;JVM终止。退出代码= 13

他说64位JDK现在正在工作,但在他的截图中可以看到他的Eclipse是32位的,因为启动器的路径。库是32位的。

And now for the reason I came here: Ony of my customers had some problems loading one of our Eclipse/OSGI based applications as well and Java exited with exit code 13. In the end it showed that the problem was not about -vm or the architectures of Java and eclipse.exe, but instead he was simply missing config.ini and I guess eclipse.exe wasn't aware what to load or such. After we recognized that and put a config.iniback in place, the app loaded fine with using -vm and a 64 Bit JRE7 in combination with a 32 Bit eclipse.exe.

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

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

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

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

java -version

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

32位版本的JRE没有64位。

我在Ubuntu上也有同样的问题,并通过解包所有*解决了它。在JDK目录下打包文件。 例如: cd /usr/java/jdk1.7.0_03 / jre / lib sudo . ./bin/unpack200 rt.pack rt.jar

Eclipse:

在eclipse.ini中添加了这两行

第二行表示javaw.exe文件的JDK位置。

虚拟机 C:\Program Files\Java\ jdk1.7.0_60 \ bin \ javaw.exe

注意:将-vm行放在-vmargs之前,否则采用默认位置。

为STS

在STS.ini中进行如上更改