Home

How to fix java was started but returned exit code=13?

Alton Alexander
By Alton AlexanderUpdated on June 4th, 2022

There are a few reasons why the java was started by returned exit code=13 error code might happen. One reason could be that the path to the java.exe file is not set correctly. Another reason could be that the classpath is set incorrectly. Finally, it could be that the java.exe file is corrupt or damaged.

Users typically search for a solution by asking about:

  • eclipse error java was started but returned exit code 13
  • java was started by returned exit code=13

1. Check if there is enough disk space

The steps to check if there is enough disk space to fix Java are as follows:

  1. Open a command prompt and navigate to the Java installation directory.
  2. Type the following command and press Enter: java -version
  3. If the Java version is 7 or 8, the command will report that there is enough disk space to fix Java. If the Java version is 6 or earlier, the command will report that there is not enough disk space to fix Java.
  4. If the Java version is 7 or 8, the command will also report the size of the Java installation directory.
  5. To fix Java, copy the Java installation directory to a new location.
  6. Type the following command and press Enter: java -jar <JAVA_INSTALL_DIR>
  7. To verify that Java was successfully fixed, type the following command and press Enter: java -version
  8. If the Java version is 7 or 8, the command will report that Java was successfully fixed.
  9. If the Java version is 6 or earlier, the command will report that Java was not successfully fixed.

2. Check if the environment variables are set correctly

The steps to check if the environment variables are set correctly in order to fix java was started by returned exit code=13 are:

  1. Check if the JAVA_HOME environment variable is set. If not, set it to the location of the Java installation.
  2. Check if the JRE_HOME environment variable is set. If not, set it to the location of the Java Runtime Environment.
  3. Check if the JAVA_HOME\bin\javac environment variable is set. If not, set it to the location of the Java compiler.
  4. Check if the JRE_HOME\bin\jre environment variable is set. If not, set it to the location of the Java Runtime Environment.
  5. Check if the JAVA_HOME\bin\javaws environment variable is set. If not, set it to the location of the Java Web Start launcher.
  6. Check if the JRE_HOME\bin\jre\bin environment variable is set. If not, set it to the location of the Java Runtime Environment.

3. Check if the java version is compatible with the application

  1. Open the command prompt and type java -version
  2. If the java version is not compatible, then you will get a message like this: java version "1.8.0_152" Java(TM) SE Runtime Environment (build 1.8.0_152-b15) Java HotSpot(TM) 64-Bit Server VM (build 25.152-b15, mixed mode)
  3. You will need to update your Java installation. For instructions, please see the Java website.
  4. If the java version is compatible, then you will get a message like this: java version "1.8.0_152" Java(TM) SE Runtime Environment (build 1.8.0_152-b15)

If you didn't find success with an option above, then try:

  1. Try to run the application with a different java version.
  2. Check if the application is compatible with the operating system.
  3. Try to run the application on a different operating system.
  4. Check if the application is compatible with the hardware.
  5. Try to run the application on a different hardware.
  6. Contact the application developer for support.