首页 > 代码库 > eclipse java was started but returned exit code = 1

eclipse java was started but returned exit code = 1

从http://www.eclipse.org/downloads/官网下载对应的操作系统版本号的文件,例如windows 64 bit,下载之后打开eclipse.exe就提示java was started but returned exit code = 1等之类的错误弹层,

Eclipse启动的时候默认会使用从windows系统目录下找到的JRE作为默认的环境,而系统目录下的JRE和实际的Java安装是不匹配的,因此会出现运行Eclipse时报错的情况。

解决方案:编辑eclipse.ini,加入JVM的路径说明, 必须在-vmargs之前加入以下代码

-vm

D:\Program Files\Java\jdk1.7.0\bin\javaw.exe仍然不行,

ok, 查看官网(http://wiki.eclipse.org/Eclipse.ini)的解决方案的代码,加入以下代码即可:

-vm
D:\Program Files\Java\jre7\bin\server\jvm.dll

ok, 问题解决了。

eclipse java was started but returned exit code = 1