Eclipse crashes on start-up. Wrong eclipse.ini?

2020-07-20 03:37发布

I'm really confused. I've worked with Eclipse IDE a lot and now I don't understand what's happening.

I've just downloaded latest Eclipse distributive and cannot start it. I'm getting the following message box before the IDE is even loaded:


---------------------------
Eclipse
---------------------------
JVM terminated. Exit code=-1
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
-XX:MaxPermSize=256m
-Djava.class.path=D:\eclipse\plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.jar
-os win32
-ws win32
-arch x86
-showsplash D:\eclipse\\plugins\org.eclipse.platform_3.3.200.v200906111540\splash.bmp
-launcher D:\eclipse\eclipse.exe
-name Eclipse
--launcher.library D:\eclipse\plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519\eclipse_1206.dll
-startup D:\eclipse\plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.jar
-product org.eclipse.epp.package.jee.product
-vm C:\Program Files\Java\jre6\bin\client\jvm.dll
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
-XX:MaxPermSize=256m
-Djava.class.path=D:\eclipse\plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.jar 
---------------------------
ОК   
---------------------------

I cannot find any additional logs. I haven't changed or modified anything. Just unzipped the archive.

Initially my eclipse.ini was:


-startup
plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product
org.eclipse.epp.package.jee.product
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m

I thought that there is a problem with this newlines between name and value of the parameters. So I removed new lines (but according to this it's actually a wrong move). So my eclipse.ini is now looks like this and I'm able to run it:


-startup plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.jar
--launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product org.eclipse.epp.package.jee.product
--launcher.XXMaxPermSize 256M
-showsplash org.eclipse.platform
--launcher.XXMaxPermSize 256m
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m

I googled for several hours. It seems only I have this problem. I believe Eclipse should work without these modifications of eclipse.ini (especially taking into account the fact they are incorrect). Any hints are much appreciated!

PS: I'm running Vista, all firewalls and antiviral software is off.

标签: eclipse
10条回答
在下西门庆
2楼-- · 2020-07-20 04:18

I had this problem today. Solved by removing both "launcher.XXMaxPermSize 256M " lines from eclipse.ini file.

查看更多
再贱就再见
3楼-- · 2020-07-20 04:21

One possible problem with your eclipse.ini file may be the jvm location, which can be the reason your eclipse didn't start. You can solve this by explicitly specifying the jvm in the -vm option after the "--launcher.XXMaxPermSize 256m" parameter.

For e.g

-vm  <your JVM path>
查看更多
走好不送
4楼-- · 2020-07-20 04:26

I have merge your idea with those find at : http://www.eclipse.org/forums/index.php?t=msg&goto=653614&S=c78decc70e6fe52540e0e2c6f4c3076f#msg_653614

And now my eclipse.ini file is :

-startup plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.jar
--launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product org.eclipse.epp.package.jee.product
--launcher.XXMaxPermSize 256M
-showsplash org.eclipse.platform
--launcher.XXMaxPermSize 256m
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
-XX:-UseCompressedOops

For the moment it seems to works

查看更多
【Aperson】
5楼-- · 2020-07-20 04:27

Two suggestions:

1/ look at this eclipse.ini and try it out
2/ look for any extra space at the end of any line within the eclipse.ini: it can prevent eclipse starting normally.

I do confirm there must be newlines between name and value of the parameters.

查看更多
6楼-- · 2020-07-20 04:27

Have you been using a previous version of Eclipse? If so it's worth installing it in a completely different area (different workspace, etc.) Eclispe does seem to misbehave from time to time and the only solution is to reinstall. (I used to get strange errors in .metadata until I cleaned everything (after saving my code!) and reinstall.

查看更多
Bombasti
7楼-- · 2020-07-20 04:30

My guess is that you are running Vista 64-bit and trying to run a 32-bit Eclipse:

--launcher.library D:\eclipse\plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519\eclipse_1206.dll

with a 64-bit JVM:

-vm C:\Program Files\Java\jre6\bin\client\jvm.dll

This will cause exactly your symptoms. The JVM will exit very early, since one of the very first things it tries to do is to load native code included in Eclipse.

The solution is to either install a 32-bit JVM (and make sure it is found before the 64-bit one in your PATH), or to use a 64-bit Eclipse.

查看更多
登录 后发表回答