13

I have used Eclipse in the past without problems over a year ago, but I downloaded Helios onto a new computer having Windows Vista and Java 1.6.13 currently. I extract the folder and try to run the Eclipse EXE and get an error stating "Java was started but returned exit code=13".

I did some digging and it appears that the config file is requiring Java 1.5 to launch (dosgiRequiredJavaVersion=1.5). Removing this line does not matter.

I went and got an archived copy of 1.5.0_22 and tried to use -vm mypath/java/jre1.5.0_22/bin in the config file before vmargs and it still does not help.

I have also tried making a shortcut and specified the "eclipse -vm mypath" in the target field of properties and still nothing.

Here are my config settings which still give the error:

-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
c:\program files\java\jre1.5.0_22\bin
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx384m

Has anyone solved this problem?

Ken
  • 131
  • 1
  • 1
  • 3
  • 1
    Did you update your environment variables (PATH and such) to point to java 1.5 ? – karlphillip Sep 23 '10 at 17:54
  • No, I thought if you placed the changes right in the ini file it specifically told eclipse what jvm to use. its been a while since i worked in java, where do i check the PATH, JAVA-HOME, etc that eclipse will try – Ken Sep 23 '10 at 18:04
  • Helios will work better with Java1.6. See this eclipse.ini as a good starting point: http://stackoverflow.com/questions/142357/what-are-the-best-jvm-settings-for-eclipse/3275659#3275659 – VonC Sep 23 '10 at 18:40
  • 1
    Its Windows environment variable PATH that you should update. This is how: http://www.java.com/en/download/help/path.xml – karlphillip Sep 23 '10 at 18:51

7 Answers7

27

This occurs when using an x86 Eclipse with a x64 JDK (and perhaps vice-versa). Just point to a JDK with the same architecture as your Eclipse in your eclipse.ini file, eg:

-vm
D:/Dev/Java/jdk1.6.0_25_x86/jre/bin/javaw.exe
Aaron Digulla
  • 297,790
  • 101
  • 558
  • 777
prefabSOFT
  • 1,094
  • 1
  • 12
  • 22
  • 4
    Also note that `-vm` expected the full path **plus the executable name**. In the question, the argument ends with `bin` which **does not work** – Aaron Digulla Nov 02 '11 at 10:17
  • Vice-versa also holds true. :) I got Eclipse 64-bit and was pointing it to JDK x86. After pointing it to JDK 64-bit it works as expected. – Leniel Maccaferri Aug 20 '12 at 14:16
2

If this started happening when seemingly nothing has changed with respect to your eclipse and java installations, and there is a chance that this started happening after a system (Windows) crash or an unexpected eclipse shutdown, the problem may be due to a change in the compatibility mode of eclipse.exe. When the system or eclipse crashed, Windows may have decided to change the compatibility mode of eclipse.exe whether you liked it or not.

Unfortunately, this mode can not be changed through the "compatibility" tab on the file properties. The change has to be made by editing the registry. Look for the two keys:

  • HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Persisted
  • HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

Look for any entries for eclipse.exe. I deleted one from each location and this solved the problem for me.

The compatibility information is tied to the file name and is persisted in the registry even if the file itself is deleted or moved. This is why changing the location of the eclipse directory will solve the problem. This also means that reinstalling eclipse in the same location will not fix the problem since the registry entry will still be there.

2

I had this same problem.

I'm on Windows Vista 64, with the 64-bit versions of both Helios and the JDK/JRE 1.6 update 14. I had been using Eclipse Galileo just fine.

Upgrading to the JDK/JRE 1.6 update 24 (the latest as of this date) fixed the problem. I didn't have to make any changes to the Helios eclipse.ini file.

jbass
  • 21
  • 2
1

For me worked placing the switch -VM at the beginning of the eclipse.ini file. Plus having both Java and Eclipse in 32-bit version, even though I have 64-bits Win 7.

Konrad Viltersten
  • 28,018
  • 52
  • 196
  • 347
Anonymous
  • 11
  • 1
1

ok, so i had this problem and updating did not work, i fixed it because apparently my computer didnt point to the right place or got confused

I have a 32 bit machine and the 32 bit java

I had the eclipse folder on my desktop and it gave me this error

I simply moved the eclipse folder to program files and it worked, no idea why

Hopefully that helped gud luck!

meow
  • 11
  • 1
  • Thank you very much! I've been banging my head against the wall with this for about 2 hours and this simple folder move is the ONLY thing that worked for me. I tried the .ini file edits and multiple re-downloads, installs, uninstalls, 64/64/32/32 bit version pairs, etc, etc, etc... – PiZzL3 Apr 18 '12 at 17:00
0

Move the folder in your Program Files. That fixed my problem with the error code 13.

Emil
  • 7,051
  • 17
  • 72
  • 131
SidoKS
  • 1
0

I also had the same issue with Eclipse Indigo on 64-bit Windows 7. The error message was "Java was started but returned exit code=1".

Updating to latest JRE 1.6 update 29 fixed it.

arsalank2
  • 1,485
  • 1
  • 14
  • 24