我正在尝试使用Eclipse进行Android开发。我在尝试运行Eclipse时遇到了这个问题,因为几分钟前刚刚安装了4.2版本。

在第一次尝试在没有任何参数指定Java VM的情况下启动Eclipse之后,我得到了一条错误消息,说它在Eclipse文件夹中找不到一个名为javaw.exe的Java VM,所以我找到了Java安装的位置,并在快捷方式的目标中将该位置指定为参数。现在我得到一个不同的错误,Java已经启动,但返回退出代码=13。

类似的问题似乎表明这是一个32位/64位的冲突,但我有99%的肯定,我下载了64位版本的Eclipse和Java (RE 7u5),我选择这两个版本是因为我有64位的Windows 7。

如果有人知道如何确认我的Eclipse和Java是64位的, 非常感谢。 如果你认为我的问题不同,请帮忙! 请尽量直白地说,因为我对Eclipse完全不熟悉 和Java。

“C:\Program Files\ eclipse - sdk -4.2-win32-x86_64\eclipse\eclipse.exe”-vm“C:\Program Files (x86)\Java\jre7\bin\javaw.exe”

完整的错误代码…

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

当前回答

我也面临着同样的问题。我已经安装了版本8和更新25 32位。

要修复此问题,请安装Java SE Development Kit 7 Update 71(64位)。然后通过appwiz。cpl,删除另一个版本,即Java Update 25。完成了。

其他回答

史上最奇怪的方法。查看Eclipse路径,确保没有奇怪的字符(比如!、#和@)。这对我很管用。

如果您最近安装了Java 8,并卸载了Java 7,请安装JDK 8后重试。

I had the same issue... installed STS but consistently got the "java was started but returned exit code=13" message. My issue was that I was using the default install file, which was not processor specific, from https://spring.io/tools/sts. I had to dive deeper to be very specific in downloading the 64 bit version. It was not intuitive as to which version you were downloading. Once I got the 64 bit version (note that the zip file still includes 'win32' in the name, just appends '-64' at end) it worked.

我尝试了以下解决方案:

我从路径C:\Program Files\Java\ jdk1.7.0_71\bin中创建了javaw.exe的快捷方式,并将其粘贴到路径C:\ProgramData\Oracle\Java\javapath中。

在那之后,我发布了Eclipse,它为我工作。

这种类型的错误主要是由于在不同版本的Eclipse中使用不同版本的Java造成的。

假设您正在系统上安装64位JDK。然后确保使用它安装64位版本的Eclipse。

如果您正在系统上安装32位JDK,那么请确保使用它安装32位版本的Eclipse。

我也有类似的问题。我已经安装了32位JDK,并试图使用64位Eclipse。

但是当我在系统上安装64位JDK时,Eclipse开始工作,没有任何问题。

建议在具有32位配置的系统上更好地安装32位版本的Java和32位版本的Eclipse,对于64位系统也是如此。

这有助于提高系统的性能。