A great many users encounter the Java was started but returned exit code=13 error in Eclipse. In this post, MiniTool will analyze all possible causes of the error and introduce several proven solutions.

Java is one of the most popular programming languages, developed by Oracle Corporation. It is widely used for desktop computers, android development, games, and other development tasks. A huge number of software developers are using this programming language.

Sometimes, however, you may encounter various errors and issues related to the Java program such as Java Platform SE binary not responding Minecraft, Java error code 1603, and Java was started by returned exit code=13. A user from the stackoverflow.com forum reported that they encounter the Java exit code 13 error in Eclipse:

I got an error message saying it couldn't find a Java VM called javaw.exe inside the Eclipse folder, so I found where Java was installed and specified that location as the parameter in the shortcut's target. Now I get a different error, Java was started but returned exit code=13.


Java was started but returned exit code 13

Possible Causes of the “Java Was Started by Returned Exit Code=13” Error

According to user reports, the “Java was started by returned exit code=13” error often occurs when trying to run Eclipse on Windows 10/8/7. After investigating extensive users reports from different forums and posts, we find the error can be caused by the following several reasons:

  • Incompatible Java version and Eclipse version: Both Java and Eclipse come in two versions of bit configurations: 32-bit or 64-bit. If you are using the 64-bit version of Java and 32-bit version of Eclipse or vice versa, you will get the “Eclipse Java was started by returned exit code=13” version.
  • Mistakes in Eclipse.ini file configuration: Sometimes you may make a mistake when configuring the Eclipse.ini file, which can trigger the error too.
  • Incorrect Java Environment Path variable: If the Java Environment path variable is set improperly, you may encounter the “Eclipse Java was started but returned exit code=13” error.
  • Unsupported or wrong version of Java Virtual Machine (JVM): If you are using an unsupported JVM version with the latest Eclipse version, it can cause incompatibility issues with Java JDK 1.8 and higher versions.
  • Special characters in the Eclipse installation directory: If some special characters like “# and @” are added to the Eclipse installation, you may encounter the “Java was started by returned exit code=13 Eclipse mars” error.

How to Fix the “Java Was Started But Returned Exit Code=13” Error

Now, you should have an overall understanding of the possible reasons for the “Java was started but returned exit code=13 Eclipse” error. To fix it, we explore corresponding solutions. Let’s start trying.

#1. Make Sure to Use Compatible Java and Eclipse Version

As you know, the Java JDK and Eclipse requires compatible version to work with one another. So, make sure that you use a supported combination of your operating system, Java JDK, and Eclipse. Here you can refer to the following supported combinations:

  1. 32-bit OS, 32-bit JDK, 32-bit Eclipse (32-bit only)
  2. 64-bit OS, 64-bit JDK, 64-bit Eclipse (64-bit only)
  3. 64-bit OS, 32-bit JDK, 32-bit Eclipse

If you have a different setup from the above combination, you need to uninstall the incompatible one and install the correct version. To do so, follow the tutorial below:

Step 1. Check if your system type is 32-bit or 64-bit version.

check system type

Step 2. Check the Java version you have installed on your PC. To do so, you can run the java –version in the elevated Command Prompt window. If the Java version is not compatible with your system type, you can uninstall the Java first and read this guide “Download, Install, and Update Java 32 Bit & 64 Bit [JDK vs JRE]” to install the correct one.

check the java version

Sep 3. Check the Eclipse version and see if there is a mismatch between the Java version and the Eclipse ide version. If not, then you need to uninstall the unsupported version and install the correct version from the official website.

#2. Reconfigure the Eclipse.in File

You may encounter the “Eclipse Java was started by returned exit code=13” error if you have made a mistake in the Eclipse.ini configuration file. Here you can follow the steps below to reconfigure it.

Step 1. Press the Win + E keys to open the File Explorer, locate the Eclipse installation directory, and open the eclipse.ini file with Notepad.

Step 2. In the Notepad window, locate the line that includes “-vmargs” in the eclipse.ini file and add the following code before the line. Then click on Ctrl + S keys to save the configuration.


The C:\Program Files\Java\jdk1.7.0_40-64\bin\javaw.exe line may vary depending on your Java JDK version. For example, if you installed a 32-bit version of Java JDK, it should be C:\Program Files (x86)\Java\jdk1.7.0_40-64\bin\javaw.exe. Besides, make sure you replace the jdk1.7.0 with your actual version.


C:\Program Files\Java\jdk1.7.0_40-64\bin\javaw.exe

Step 3. If you installed the Java IRE on Windows, you can try adding the -vm C:\Program Files (x86)\Java\jre7\bin\javaw.exe or -vm C:\Program Files\Java\jre7\bin\javaw.exe line instead. It also has been proven by many people from the StackOverflow forum to be useful.

Once done, you can run the Eclipse again and see if the “Java was started by returned exit code=13 sts” error persists.

#3. Remove Special Charters from the Eclipse Installation Directory

Many users reported that they managed to fix the “Eclipse Java was started but returned exit code=13” error by deleting the special characters from the Eclipse directory name. Usually, you can find the installation folder in Eclipse in C:\IDE\eclipse. If not here, you may have installed it on a custom location and mistakenly added a special character.

#4. Remove Incorrect Environment Path Variable

It’s reported that Java 8 and some Java updates may mess up the environment path variables and cause the “Eclipse error Java was started but returned exit code 13” issue. In this case, you can follow the steps below to remove the wrong path variable.

Step 1. Type system variable in the Search box and select Edit the system environment variables from the Best match.

select Edit the system environment variables

Step 2. In the pop-up window, navigate to the Advanced tab and click on Environment Variables.

click Environment Variables

Step 3. Select Path under the System variables section and click on Edit.

click Edit under System variables

Step 4. Find an environment variable related to Java (e.g. C:\ProgramData\Oracle\Java\javapath), select it, and click on Delete.

Step 5. Then restart and check if the Eclipse Java was started by returned exit code=13 error gets fixed.

If not, you can try removing the C:\ProgramData\Oracle\Java\javapath and replacing it with C:\Program Files\Java\jdk(your version)\bin, which has been proven by some users to be helpful.

a user report from stackoverflow

#5. Clean Install Java JDK

If none of above the methods fix the “Java was started by returned exit code=13 Eclipse mars” error, you may consider performing a clean reinstallation of Java JDK. For that:

Step 1. Press the Win + R keys to open the Run box. Then type appwiz.cpl in it and hit Enter.

Step 2. In the Programs and Features window, right-click the Java JDK or its related updates and select Uninstall. Then follow the on-screen instructions to complete the uninstallation.

Step 3. Once uninstalled, click here to download the Java JDK according to your OS version and install it.

Further reading: Do you want to manage your partition and disk on Windows effectively? MiniTool Partition Wizard is a good choice that can help you extend/resize/delete partition, convert a disk to MBR/GPT, migrate OS, etc. Besides, it can help fix various problems such as C drive full, and corrupt file system. Perhaps you need such a tool.

  • Linkedin
  • Reddit