重装系统无法打开Eclipse – Java was started but returned exit code=13

出错代码:

Java was started but returned exit code=13
C:\Program Files (x86)\Java\jre7\bin\javaw.exe
-Xms40m
-Xmx512m
-XX:MaxPermSize=256m
-jar C:\Program Files\Eclipse-SDK-4.2-win32-x86_64\eclipse\\plugins/org.eclipse.equinox.launcher_1.30v20120522-1813.jar
-os win32
-ws win32
-arch x86_64
-showsplash C:\Program Files\Eclipse-SDK-4.2-win32-x86_64\eclipse\\plugins\org.eclipse.platform_4.2.0.v201206081400\splash.bmp
-launcher C:\Program Files\Eclipse-SDK-4.2-win32-x86_64\eclipse\eclipse.exe
-name Eclipse
--launcher.library C:\Program Files\Eclipse-SDK-4.2-win32-x86_64\eclipse\\plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v201205221813\eclipse_1503.dll
-startup C:\Program Files\Eclipse-SDK-4.2-win32-x86_64\eclipse\\plugins/org.eclipse.equinox.launcher_1.30v20120522-1813.jar
--launcher.overrideVmargs
-exitdata 1e30_5c
-vm C:\Program Files (x86)\Java\jre7\bin\javaw.exe
-vmargs
-Xms40m
-Xmx512m
-XX:MaxPermSize=256m
-jar C:\Program Files\Eclipse-SDK-4.2-win32-x86_64\eclipse\\plugins/org.eclipse.equinox.launcher_1.30v20120522-1813.jar

 

Your version of Eclipse looks OK, based on the filename.

To check your version of Java, run

  java -version 

in a console (command prompt). On Windows 7 with 64-bit Java 6 I get:

  java version "1.6.0_27"
  Java(TM) SE Runtime Environment (build 1.6.0_27-b07)
  Java HotSpot(TM) 64-Bit Server VM (build 20.2-b06, mixed mode)

Note the 3rd line, which shows that this is a 64-bit version.

On a 32-bit version you’ll get something like:

  Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing) 

Check that this is the version being used by Eclipse, as shown in your error code. If not, call that version explicitly, by running the following command in a console (command prompt):

  "C:\Program Files (x86)\Java\jre7\bin\java.exe" -version

(using the correct path to java.exe as shown in your error message, not necessarily the path shown in my example above!)

If it turns out that 64-bit Eclipse is trying to use a 32-bit Java, then the exact solution will depend on your system and setup, but will probably involve some combination of:

  • editing the PATH system variable to point to the desired 64-bit Java JDK
  • uninstalling 32-bit version(s) of Java JDK/JRE (if not required for other purposes)
  • downloading and installing an up-to-date 64-bit version of Java JDK

Several of the other answers explain some specific solutions along these lines.

Leave a Comment

 
Copyright © 2008-2021 lanxinbase.com Rights Reserved. | 粤ICP备14086738号-3 |