1

everyone

I met some problem when I was installing eclipse with JavaEE. I cannot open eclipse.exe. Therefore I refer to some link: Can't start Eclipse - Java was started but returned exit code=13

I also suffer the same problem like this guy. When I open eclipse.exe, it will output the message like image[1] below, which seems to show that my Java version is not consistent with my current version( image[2] ), but I have no idea how to fix this bug. I don't know why it showed "C:\Program Data\Oracle\Java\javapath\javaw.exe" cuz I installed java in "C:\Program Files\Java\" and current Java version is 1.8. Can anyone help me?

![1]:(http://imgur.com/lBeYJvY)

![2]:(http://imgur.com/dJTWRNY)

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20150204-1316
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx512m
Community
  • 1
  • 1
Tsung-Hsiang Wu
  • 81
  • 1
  • 10
  • I found out that since I have the newest Java version, sometimes current IDE default setup doesn't support it. Therefore install the latest JDK version. In my case, though I updated the java version, I didn't update the JDK. After update, the problem was solved. – Tsung-Hsiang Wu Mar 27 '15 at 12:18

1 Answers1

1

By default the eclipse launcher uses the java version that it finds on the path by searching for java.exe.

Based on your description it seems you at least two java installations on your local machine, i.e.

  • C:\Program Data\Oracle\Java\javapath
  • C:\Program Files\Java\

Now, the solution is to make eclipse launcher use the version that you want (which I assume it the java 1.8 in Program Files). So to do that, add the following two lines to your eclipse.ini:

-vm
C:/Program Files/Java/jre/bin
Michael Heß
  • 161
  • 6