四月 22nd, 2011
Eclipse出现java was started but returned exit code 1报错并退出的解决方法
No Comments, 技术杂谈, by 陈威.热度:
最近在使用Eclipse时发现无法启动,或者启动后经常出现崩溃退出的情况,提示的错误信息都是“java was started but returned exit code 1”,下载安装了最新版的Eclipse后还是没有解决问题。无奈之下只好百度之,翻了好几页都没有发现有用的信息,直接换到Google.com,终于在Eclipse Forum找到了一个靠谱的答案(网址是http://www.eclipse.org/forums/index.php?t=tree&goto=547573&#page_top),回答答案是“Eclipse is using the system default JRE that it finds in the windows system folders. You should point it to a JDK installation using eclipse.ini (as described here: http://wiki.eclipse.org/Eclipse.ini )”,大意是Eclipse启动的时候默认会使用从windows系统目录下找到的JRE作为默认的环境,由于我之前升级安装了一下JDK,所以系统目录下的JRE和实际的Java安装是不匹配的,因此会出现运行Eclipse时报错的情况。