Eclipse 启动不起来异常:JVM terminated. Exit code=-1

Eclipse 启动不起来,出现以下错误:

JVM terminated. Exit code=-1
-Xms40m
-Xmx256m
-Djava.net.preferIPv4Stack=true
-XX:MaxPermSize=512m
-Djava.class.path=D:/Develop/Php/eclipse/plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.j
ar
-os win32
-ws win32
-arch x86
-showsplash D:/Develop/Php/eclipse//plugins/org.eclipse.platform_3.3.101.v200902111700/splash.bmp
-launcher D:/Develop/Php/eclipse/eclipse.exe
-name Eclipse
--launcher.library
D:/Develop/Php/eclipse/plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.101.R34x_v20080731/ecl
ipse_1115.dll
-startup D:/Develop/Php/eclipse/plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar
-vm c:/Java/jdk1.6.0_10/bin/../jre/bin/client/jvm.dll
-vmargs
-Xms40m
-Xmx256m
-Djava.net.preferIPv4Stack=true
-XX:MaxPermSize=512m
-Djava.class.path=D:/Develop/Php/eclipse/plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.j
ar

网上搜索->解决此类错误的方法有以下几种:

首先:eclipse 安装路径下的eclipse.ini的内容如下:

-startup
plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
512m
-vmargs
-Xms40m
-Xmx256m
-Djava.net.preferIPv4Stack=true

          第一种: eclipse.ini中内存设置过大的问题,修改了一下,-Xms256m改成-Xms128m,把Xmx512m   改为 Xmx256m,即可。

                        原因:大内存的配置导致的。

          第二种:在eclipse.ini 中,增加了如下两行后,问题解决:
                          -vm
                         D:/Program Files/Java/jdk1.6.0/bin/javaw.exe  

                         其中javaw.exe是我的JDK安装路径。同时,完整的eclipse.ini如下

                          -startup
                          plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar
                         -showsplash
                         org.eclipse.platform
                         --launcher.XXMaxPermSize
                         512m
                         -vm
                         C:/Java/jdk1.6.0_10/bin/javaw.exe

                         -vmargs
                         -Xms40m
                        -Xmx256m
                        -Djava.net.preferIPv4Stack=true

          第三种: 删除eclipse 安装目录下的eclipse.ini 文件,重新启动 eclipse.exe 即可。此时会在启动时重新自动创建一个eclipse.ini 文件

你可能感兴趣的:(Eclipse 启动不起来异常:JVM terminated. Exit code=-1)