A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始

前些日子,我之前安装的Eclipse突然就出现问题了,考虑那些天更新过jre,也装过其它软件,不知问题出在哪里,今天尝试用Google搜索问题,终于让我找到了解决方法,不过答案在YouTube上,相信很多人无法看,所以,就将其方法帖在下面,希望对大家有用:
How To Fix Eclipse Error - Java was started but returned exit code 13

So finally you have installed JDK and Set the path according to all the tutorials [including mine:P] but still not able to run eclipse because of a stupid error: Java was started but returned exit code=13

Whats is this heck? How diffcult it can be to start eclipse? Dont you worry because this is the last thing which you have to do and after that everything will work perfectly fine. Here is the fix:

1) Go th the eclipse installation folder or where you have extraced it from the zip file.
2) Search for the eclipse.ini file which would be present in the parent folder of the eclipse.
3) Right click on the .ini file and select edit.
4) Now put the following code as shown in the tutorial:

-vm
C:/Program File/Java/jdk1.7.0_21/bin/javaw.exe

5) Hit the save button and ypu are done.

Now run eclipse and ypur hard work to run eclipse have finally piad off, go and start working on eclipse for various projects.
Lets check is it really working? :P Yaiyeee its working finally !!!!

How to fix Java Error: Java was started but returned exit code 1

So after fixing exit code 13 and JVM not found are you still getting the exit code 1 error? Then probably you have done something wrong. First check that if you have the latest JDK(Java Development Kit) Downloaded? And what is the architecture of the PC on which you are running is that 64-bit or 32-bit? And is it same as the JDK version? because it should be same. Have you set the path in environment variable like shown in the JVM not found video? Do all of the above before continuing.

1)Go to the eclipse folder and right click on the eclipse.ini and select edit.

2)Now Add the following lines:[path of the jdk should be where you have installed jdk

-XX:-UseCompressedOops
-vm
C:\Program Files\Java\jdk1.7.0_21\jre\bin\server\jv­m.dll

Don't use the one in C:\Windows\System32

NOTE: The above fix also fixes Eclipse error : Java was started but returned exit code=2
[Notes:
In some cases it still not work, then please add the above lines before -vmargs like in the video]

Lets see how does it work out? Finally it has worked out, now go and make the best app possible!

Thanks for watching, please subscribe to how to channel for more tutorial!


9 个回复

倒序浏览
我来翻译一下。
注意,我只是翻译,并没有试过楼主给出的方法,本人安装eclipse也并没有遇到过任何问题,这里提供翻译仅仅是为了方便大家快速找到解决方法。翻译不到位之处敬请沟通。
1.当eclipse返回错误代码十三的时候怎么办?
第一步,找到eclipse的安装目录,或者是它的解压目录。
第二步,找到eclipse.ini这个配置文件。这个配置文件应该在eclipse可执行程序的父目录里。
第三部,右键编辑这个配置文件。
第四步,把下面的代码加入到配置文件中:

-vm
C:/Program File/Java/jdk1.7.0_21/bin/javaw.exe (视jre安装目录而定)
================================================================
如果遇到了错误代码1,应该怎么解决?
首先,确定你的jdk是最新版本的。另外,要确定你的jdk版本和操作系统位数(64/32)是一致的。再往下继续之前你应该确定上面两步你都试过了。

在eclipse的配置文件里加入如下代码:
-XX:-UseCompressedOops
-vm
C:\Program Files\Java\jdk1.7.0_21\jre\bin\server\jv­m.dll
回复 使用道具 举报
学习学习!
回复 使用道具 举报
我擦。黑马简直人才太多了嘛。撒子都会!
回复 使用道具 举报
都是大神啊
回复 使用道具 举报
帮顶。。。。
回复 使用道具 举报
虽然还没有碰到,先MARK一下,指不定啥时候就碰到了
回复 使用道具 举报
ETOLIA 发表于 2015-5-28 16:31
我来翻译一下。
注意,我只是翻译,并没有试过楼主给出的方法,本人安装eclipse也并没有遇到过任何问题,这 ...

首先,谢谢你的翻译。只不过Note的内容没有指明,事实上,我在修改配置文件时,针对错误13,只要将要添加的内容放到-vmargs之前,我的问题就已经解决了。之后的错误1也没有出现。所以我觉得这个也很重要。还有错误13之所以出现很可能跟我之后更新了jre而jdk没有更新有关(jre是自动更新的),结果可能是因为版本不匹配吧,反正也没打算深究这个问题,只要能用就好,毕竟测试是要用这个的。
回复 使用道具 举报
夏尔 中级黑马 2015-5-29 08:57:12
9#
来学习一下
回复 使用道具 举报
ETOLIA 发表于 2015-5-28 16:31
我来翻译一下。
注意,我只是翻译,并没有试过楼主给出的方法,本人安装eclipse也并没有遇到过任何问题,这 ...

英文好,就是潇洒。。。
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 加入黑马