Fix Java was Started but Returned Exit Code=13 in Eclipse

If you are getting an error saying “Java was Started but Returned Exit Code=13” during Eclipse installation,  then there is a fix for that.  Even I faced this problem during eclipse installation on my windows operating system. After searching on google, I found that many of the users facing a similar issue with Eclipse. If you are one of them, then here is the solution for the error.

Reasons  for Java was Started but Returned Exit Code=13 Error:

Java was Started but Returned Exit Code=13 Error

Before going to the solution, let us know why it is showing that error. If you know the problem with this issue, we can easily fix that error.

Reason 1: The most common reason behind this problem is, we are trying to install different bit version-that is 64 bit or 32-bit version of the software. It may be either Eclipse or Java.

Reason 2: Configuration mistake in Eclipse.ini  file

Reason 3: Special characters ( #, !, @) in Eclipse installation directory

Reason 4: You may be using latest version of Eclipse, but you might be using  wrong version or unsupported version  of Java Virtual Machine (JVM)

Reason 5: Issue with your Environment Path Variable

The above are the main reasons causing that Exit code =13 in eclipse. Now let us know how to fix that error.

 

How to Fix – Java was Started but Returned Exit Code=13 Error in Eclipse

The Solution for Reason 1:

Check which version of operating system you are running. To check that, open windows explorer by pressing a Win+E key on your keyboard.

finding 32bit or 64 bit version windows 8 os

Now on This PC (My  Computer)  which you found on the left side, Select that and right click on the mouse. In that pop-up menu choose Properties option.  When you click that properties option you will see system properties window. In that window have a look on “System Type” option.

In that  System type, you will see 64-bit Operating System. That’s what we need to know.

Now we know which version of the operating system we are running.

After knowing operating system version, make sure you downloaded the 64-bit version of Eclipse as well as a 64-bit version of Java software.

If you downloaded 32-bit version (X86) of Java or eclipse any one of them, you will get that Exit code=13 error.

Please double check the versions which you have downloaded. Because during installation it won’t show any error regarding the incompatible version. It will install smoothly.

In my case, I have installed the 32-bit version of Java so I’m getting that error.

 

The solution for Reason 2:

Maybe you might have made a mistake in configuring Eclipse.ini file, which can be found on Eclipse directory itself.  You can check this official guide if needed.

Here the few important rules to be noted while specifying -VM option

  • 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.

You can check the below screenshot of my working Eclipse.ini configuration.

eclipse ini file

 

The solution for Reason 3:

You have might have special characters like #, !, @  in eclipse installation directory. That is, if your eclipse installation address contains any special characters, then it shows that error. So make sure you don’t have any special characters.

Example:

Before fixing special character

C:\# IDE\eclipse 3.7\

Have you noticed that “#” character?

After fixing that special character in address

C:\IDE\eclipse 3.7\

and that solved the problem.

 

Reason 4 Solution:

Maybe you are using latest eclipse version and unsupported Java version.

check java version command windows

 

To check which version of Java you are using open command prompt by pressing a win+R key and type cmd and press Enter. Now in that console type Java -version command to know java version.

Now research whether Eclipse supports that version or not.

(or)

You can open “readme” folder in Eclipse folder and open readme_eclipse.html to see which version it supports.

(or)

I recommend you to download both Java and eclipse the latest version.

Reason 5 Solution:

For some user after removing some system variable entry on “Environment Variable” it started working.

To do that.

Search for “System Variable” and Select “Edit the System Environment Variable” option.

system variable

 

After that, choose “Advanced” tab >> Environment Variables.. >> Select “Path” >> click “Edit” and then remove the first entry. That is, “C:\ProgramData\Oracle\Java\javapath;”

 

remove path variable entry
Click on the image to enlarge

 

Hope you have fixed  Java was Started but Returned Exit Code=13 Error in Eclipse by following this post. Let us know which reason causing you that error by the comment.

 

251 thoughts on “Fix Java was Started but Returned Exit Code=13 in Eclipse”

    1. Thanks Arun! Very nice Article…clear and helpful
      Reason 2 was my problem and adding the -vm with path to javaw.exe solved the problem

  1. Thank you! It turns out the address for my vm (reason 2) was missing altogether :/ Dunno how on earth my eclipse worked beforehand, but this really helped

  2. Debabrata Patnaik

    Thanks for the explanation with eclipse configuration file details. That resolved the issue. My configuration file did not have -vm and its path. After adding JDK path it worked like charm.

    Regards,
    Deb

  3. Thanks for the support, I had problem 1 but it took me one hour to figure out that I had Java 32 bit installed. Please add this to point 1):
    To check if the Java version is a 64-bit one run in a prompt:
    java -d64 -version
    If it gives an error you probably have a 32-bit one.

  4. I have checked first two reasons you have given here. And they are not showing. I have just downloaded eclipse and when I run the eclipse application file from eclipse folder this error code=13 is showed.
    The java version is jdk 1.7.0
    Please guide me what should I do.

    1. Hi, please read this article fully. There are 4 reasons which may cause this issue please check all those issue once.

  5. Thank you very much for this post, my problem as solved after downloading version x64 of jre8…
    i dont know why eclipse stoped to work… i think a update caused this.

  6. Thank you very much for this post.

    In my case, java 8 with latest version 25 was installed with 32 bit version. I confirmed the same by using the command :

    c:\java -d64 -version

    java version “1.8.0_25”
    Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
    Java HotSpot(TM) Client VM (build 25.25-b02, mixed mode, sharing)

    posted in the comments above.

    Went to the official site : http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

    and downloaded jdk-8u25-windows-x64.exe and ran the installation wizard. After this, I verified the version:

    C:\>java -d64 -version
    java version “1.8.0_25”
    Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
    Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

    C:\>java -d64 -version
    java version “1.8.0_25”
    Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
    Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

    And Eclipse works fine! Thanks a lot!

    1. I am sorry. Small correction above, I got the following before I downloaded 64 bit JAVA 8 upd 25.

      C:\>java -d64 -version
      Error: This Java instance does not support a 64-bit JVM.
      Please install the desired version.

  7. Great help thanks. I had the wrong version of java installed. It downloaded the 32bit version whilst I needed the 64bit version

  8. Thanks a lot. Can you believe that i wasted 1.5 hours on this and the reason was reason no. 3. Holy Shit, such a small error. . . Thanks for your help buddy. . 🙂

  9. I installed Eclipse eclipse-java-luna-SR2-win32-x86_64 and the ini did not even have a -vm option but once I added it, all was good.

  10. Recently I had a similar issue, I am on Windows 8 and have version 6 and 7 of Java of both 32 and 64 bit versions installed on my system.I was getting the same error (code 13), all I did was delete “Oracle” folder under “Program Data” folder.

  11. This helped. I was able to get Eclipse to work before but somehow it stopped working lately. I fixed it by adding the -vm code for the javaw.exe file in eclipse.ini.

  12. Awesome! it’s really helfull! my problem was that I have diferet version of Java only I download a 64 and it works

  13. Just an Update –
    Please try to set javaw.exe of Jre instead of Jdk in eclipse.ini file as described below –
    -vm
    c:\Program Files\Java\jre7\bin\javaw.exe

  14. Thanks a lot ! The problem with me was that i was using the wrong version of Java, i changed de system variable “Path” to get the right path to Java executable and it works now.

  15. Thanks for the advice. After opening my eclipse.ini file I noticed that there was no vm specified, i.e. the path to my javaw.exe file. Once I edited the file my eclipse started up and I’m ready to continue reading my copy of Head First – Android Development. Thanks Arun!

  16. Mishal Sanghvi

    Thanks..this helped. My eclipse was working fine till I updated to a newer JDK. I don’t know why the problem occured but the solution was to add the “-vm” arg and value in the eclipse.ini file.

  17. I was having same issue as Mishal Sanghvi.. updating a new JDK caused this. Thank you so much for you help!

  18. Sagnik Majumder

    Thanks, it worked for me. My reason was No 2. I had to add “-vm” arg and its value in the eclipse.ini file. I guess the source of my Eclipse installation is having this issue.

  19. Superb explanation. Crystal clear information. You dont have to visit any other website if you arrive here for Eclipse issues.

  20. Thank you so much for this useful blog. I downloaded a x64-Bit Java version and changed the eclipse.ini as you described. And it works!!!!

    Cheers!

  21. Thanks a lot I’ve successfully eliminate the error code 13 by following the solution for the reason 2 very helpful !

  22. Your pointer to check the version led me to realize I had installed an older version of Java in order to work on an Android project. That version took over, and Eclipse tried to use it. Specifying a more recent version of Java in the eclipse.ini did the trick.

    Thanks!

  23. i have done with this process even though its not working … my java path is also correct even showing fatal error now …..what can i do for further process

  24. Thanks a lot, It solved my problem, I really appreciate your work and your blog help full
    Merci beaucoup !!!

  25. SreeSekhar Palaparthy

    Solution #2 worked for me, thanks a lot. I had to just add the -vm and specify full path for the javaw.exe in the eclipse.ini file

  26. Hello,

    I have been using eclipse from past 3 months with the same java configuration .

    But all of a sudden i am facing this issue today. Neither of the above scenarios are helping me out.

    Please suggest.
    Thanks,

  27. At Last your Provided Solution in Step @ 2 works out-of the BOX

    after I edited and specified -vm line in eclipse.ini file , i.e. with the path to javaw.exe file.
    eclipse started up immediately.

    -vm
    C:\Program Files\Java\jdk1.7.0_51\jre\bin\javaw.exe

  28. Antúlio de Oliveira

    Arun Kumar,
    Thaks a lot, Guy!
    My mistake was “Reason 3: Special characters ( #, !, @) in Eclipse installation directory).
    I used ‘#’ in name of directory.
    Thank you very much for your information!
    Antulio Oliveira

  29. Have been trying for two days to get my Eclipse Studio back on line. I followed instructions and it is now working. You are the best!

  30. In my case, the culprit was my anti-virus.
    Actually, anti-virus deletes some .exe files without letting us know.

    So, I disabled my anti-virus, and installed “jdk-7u80-windows-x64” (64-bit version, in my case) again. And the eclipse worked fine from then.

    My suggestion for everyone would be that disable your anti-virus before installing any heavy software (like GTA-V, FarCry, Android, PhotoShop, Eclipse, Java, etc.).

  31. Praveen Gullapalli

    Appreciate your detailed step-by-step troubleshooting options. In my case i had to update Java from 32bit to 64bit and Eclipse started working like a charm!!

    As some one suggested in their comments i ran Java -d64 -version command to confirm that i had a 32-bit version which was causing the issue.

  32. Thank you very much guru,
    In my case Java got upgraded and “javaw.exe” version was incorrect.
    After updating Eclipse config file with below lines, eclipse stareted working fine
    -vm
    C:\Program Files (x86)\Java\jdk1.8.0_51\bin\javaw.exe

  33. Samuel Olugbenro

    Mine was caused by setting

    -vm
    C:\Program Files (x86)\Java\jdk1.7.0_45\jre\bin\javaw.exe

    Instead of

    vm
    C:\Program Files\Java\jdk1.7.0_79\bin\javaw.exe

  34. Manjula N
    Thank you very much,getting same error,installed wrong jdk …delete and installed new version working fine.

  35. Thanks a lot Arun, your post was very helpful. My Luna now works again. It was like a magic as soon as I added the -vm arguments in eclipse.ini, the eclipse IDE opened.

  36. add below line to eclise.ini
    x64 – “C:\Program Files\Java\\bin\javaw.exe”.
    x32 – “C:\Program Files(x86)\Java\\bin\javaw.exe”.

  37. Very helpful, solved my problem. Thanks a lot.
    I switched to 32 bit eclipse, and it started OK.
    The weird part is that I’m using 64 bit Windows 10 on a 64 bit 2-core hp-pavillion.
    Regards.
    Luis

  38. Sanchit Khardenavis

    Thanks for helping.

    I have 64 bit system and 64 bit java installed. Somehow eclipse was taking 32 bit path. I installed 32 bit Java and gave -vm with 32 bit jre path. Its working now.

  39. Hi Arun,

    Thanks for you explanation and solution for this issue.
    I got this problem due to the first reason. I have installed two bit-versions of JDK.
    Went through your article and resolved my issue.

    Thanks again.

  40. one more solution is:
    Check the environment variables.
    path: it contains c:\oracle\..\javapath (remove this)
    and add the c:\prog…fil.\java\jdk(ver)\bin\

    It is works for me.

  41. Thanks, Your solution #2 is worked for me. In my eclipse.ini file -vm pathname itself was not there, after adding this line with path its worked for me.

  42. Thank you Arun. Solution 2 works for me. My ini file didnt have a entry with -vm and its path. i have added as per your screenshot and it started working fine.

  43. I would like to add that in fact I had missing the
    -vm section so I added it to the .ini file and problem solved..

    -vm
    C:\Program Files\Java\jdk1.7.0_80\bin\javaw.exe

  44. I tried installing the jee mars edition and it was missing -vm option in .ini file.
    Changing it as suggested worked like a charm.

    Thank you for the information. Really Appreciate it.

  45. Sarah Carolina

    Still super useful! Thank you so much! In my case it was the 1st possibility: wrong bit versions. 🙂

  46. Suddenly got this same error. It was because of reason 2, my -vm was missing. Thanks for the help! 🙂

  47. Very cool! I have three problems!
    Reason 1: The most common reason behind this problem is, we are trying to install different bit version-that is 64 bit or 32-bit version of the software. It maybe either Eclipse or Java.
    Reason 2: Configuration mistake in Eclipse.ini file
    Reason 5: Issue with your Environment Path Variable

  48. Thanks a lot. This issue occurred Just a day before we were scheduled to go live and had to do a bug fix. This post saved me. Reason 2 worked for me. But was wondering why it failed in the first place ? The current setup (Java+Eclipse) worked without a jig until now and suddenly this happened. Anyways, please back fill any information on why this happened. Thanks again and GOOD TIME 🙂

  49. Thanks a lot. option#2 worked for me. I had my eclipse working all this while and suddenly got this error. found out that the -vm option was missing :O

  50. Another trick is to do a search for javaw.exe and add the path to your variables. Many times, you’ll need multiple versions of Java on your machine, and knowing where their path is for each program will help.

  51. Durga Pratapani

    Good post that was timely help. Saved my day.
    I had the issue 2 and placing -vm before -vmargs fixed the issue

  52. Thanks a ton!!!
    IT support failed to resolve it, then I started google and got to this page. Problem #2 was the issue.

    Thanks…

  53. Thanks, my problem was reason #1. turns out even though I got the Eclipse x64 version, I had installed the x86 version of Java JDK.

  54. non of the above solutions worked for me

    this is my ini file content

    -startup
    plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar
    –launcher.library
    C:\Users\mallikarjuna reddy\.p2\pool\plugins\org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.401.v20161122-1740
    -product
    org.eclipse.epp.package.java.product
    –launcher.defaultAction
    openFile
    -showsplash
    org.eclipse.platform
    –launcher.appendVmargs
    -vm
    C:\Program Files\Java\jre-9.0.1\bin\javaw.exe
    -vmargs
    -Dosgi.requiredJavaVersion=1.8
    -XX:+UseG1GC
    -XX:+UseStringDeduplication
    -Dosgi.requiredJavaVersion=1.8
    -Xms256m
    -Xmx1024m
    -Declipse.p2.max.threads=10
    -Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest
    -Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/

  55. Very useful information and the issue got fixed for me by following the below

    1) Mine in Windows 10 64 bit OS – X64, Eclipse downloaded is: eclipse-jee-neon-3-win32-x86_64

    2) Downloaded the java 64 bit from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
    Under Java SE Development Kit 8u181 -> downloaded the file jdk-8u181-windows-x64.exe

    3) Keep the Eclipse folder in C drive -> Path should be C:\Eclipse

    4) In Eclipse folder -> edit the file “eclipse.ini” and replace as below

    -startup
    plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar
    –launcher.library
    plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.401.v20161122-1740
    -product
    org.eclipse.epp.package.jee.product
    –launcher.defaultAction
    openFile
    -showsplash
    org.eclipse.platform
    –launcher.defaultAction
    openFile

    -vm
    C:\Program Files\Java\jdk1.8.0_181\bin\javaw.exe

    –launcher.appendVmargs
    -vmargs
    -Dosgi.requiredJavaVersion=1.8.0_181
    -XX:+UseG1GC
    -XX:+UseStringDeduplication
    -Dosgi.requiredJavaVersion=1.8
    -Xms256m
    -Xmx1024m

    5) Now execute the eclipse.exe and check if it works.

    So my scenario works with the combination as

    64-bit OS, 64-bit JDK, 32-bit Eclipse

    Thank you.

  56. None of the above worked for me….. so sad

    Below is my config file

    -startup
    plugins/org.eclipse.equinox.launcher_1.5.0.v20180512-1130.jar
    –launcher.library
    plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.700.v20180518-1200
    -product
    org.eclipse.epp.package.java.product
    -showsplash
    org.eclipse.epp.package.common
    –launcher.defaultAction
    openFile
    –launcher.defaultAction
    openFile
    –launcher.appendVmargs
    -vm
    C:\Program Files (x86)\Java\jre1.8.0_171\bin\javaw.exe
    -vmargs
    -Dosgi.requiredJavaVersion=1.8
    -Dosgi.instance.area.default=@user.home/eclipse-workspace
    -XX:+UseG1GC
    -XX:+UseStringDeduplication
    –add-modules=ALL-SYSTEM
    -Dosgi.requiredJavaVersion=1.8
    -Dosgi.dataAreaRequiresExplicitInit=true
    -Xms256m
    -Xmx1024m
    –add-modules=ALL-SYSTEM

    1. check for JDK, OS and Eclipse combination

      32-bit OS, 32-bit JDK, 32-bit Eclipse (32-bit only)
      64-bit OS, 32-bit JDK, 32-bit Eclipse
      64-bit OS, 64-bit JDK, 64-bit Eclipse (64-bit only)

  57. Reason 1 for me, apparently Java thought it’d be ok to switch to a 32 bit version on updates. You just saved me a lot of time and frustration, thanks!

  58. Hi,

    I am getting this error only for standard users and not for users whom having admin rights. Please help me on this issue.

    Thanks,
    Vijay

  59. Most of the cases its the combination between JDK, OS and eclipse.

    Please flow below combination only:

    32-bit OS, 32-bit JDK, 32-bit Eclipse (32-bit only)
    64-bit OS, 32-bit JDK, 32-bit Eclipse
    64-bit OS, 64-bit JDK, 64-bit Eclipse (64-bit only)

  60. Thanks Arun… Adding -vm argument in eclipse.ini file fixed my issue. Earlier, it was incorrectly picking the 32bit JDK somehow…

  61. Did lots of googling and spent almost 6 hours to fix this.

    The solution for Reason 3, worked for me.

    Eclipse installation direcroty name was containing # character

    Thanks

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top