On starting eclipse, it gives an error “Java was started but returned exit code=13”

懵懂的女人 提交于 2019-12-13 04:47:09

问题


I am trying to start eclipse after installing java 7 and adding the line

-vm
C:\Progra~2\Java\jdk1.7.0_45\bin\javaw.exe

to the eclipse.ini file. Still i am getting the error "Java was started but returned exit code=13".

I just want to know how to start eclipse. Even if i have to install eclipse, java, jre all over again. Any suggestion will do!

My eclipse.ini file:

-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
C:\Progra~2\Java\jdk1.7.0_45\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m

On pasting the jre in eclipse folder i am getting this error:


回答1:


All you have to do is to put the new jdk path in eclipse.ini

-vm
C:\Program Files\Java\jdk1.8.0_11\bin\javaw.exe
or the your new jdk path.
make sure that you type the above just before the -vmargs and after the OpenFile

that solved my problem




回答2:


Check that you have installed the correct java that your OS requires. Meaning, if you are running a 64 bit OS then you need 64 bit java and the same for 32 bit.




回答3:


Check eclipse.ini file, and in particular format of the vm option (look here for more):

Note the format of the -vm option - it is important to be exact:

  • The -vm option and its value (the path) must be on separate lines.
  • The value must be the full absolute or relative path to the Java executable, not just to the Java home directory.
  • The -vm option must occur before the -vmargs option, since everything after -vmargs is passed directly to the JVM.

Another thing to check is that bit version (32/64) of JVM should match bit version of eclipse (32/64).



来源:https://stackoverflow.com/questions/19724839/on-starting-eclipse-it-gives-an-error-java-was-started-but-returned-exit-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!