Resolving Eclipse Startup Issue: “Java was started but returned exit code=13”

Resolving Eclipse Startup Issue: "Java was started but returned exit code=13"

22 May 2024 Stephan Petzl Leave a comment Tech-Help

If you’re new to Android development and using Eclipse, encountering the error “Java was started but returned exit code=13” can be frustrating. This guide will help you troubleshoot and resolve this issue effectively.

Understanding the Issue

The error typically occurs due to a mismatch between the bit versions of Eclipse and the Java Runtime Environment (JRE) or Java Development Kit (JDK) installed on your system. Here’s how you can identify and resolve the problem.

Step-by-Step Solution

1. Verify Java Bit Version

First, confirm that you have the correct version of Java installed. Open a command prompt and type:

java -version

You should see output similar to this for a 64-bit version:

    java version "1.8.0_231"
    Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
    Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)
  

If it indicates a 32-bit version, you need to install the 64-bit JRE or JDK.

2. Check Eclipse Configuration

Ensure that Eclipse is configured to use the correct Java version by editing the eclipse.ini file. Add the following lines:

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

Make sure this comes before the -vmargs line in the file.

3. Modify System Environment Variables

Check your system’s PATH variable to ensure it points to the correct Java version. Navigate to:

System > Advanced system settings > Environment Variables

In the ‘System variables’ section, find the ‘Path’ variable and ensure it includes the path to the 64-bit Java installation:

C:\Program Files\Java\jdk1.8.0_231\bin

Remove any references to 32-bit Java installations.

4. Reinstall Java

If the above steps do not resolve the issue, consider reinstalling the 64-bit JDK. Uninstall the existing Java installations through:

Settings > Apps

Then, download and install the latest 64-bit JDK from the official Oracle website.

Additional Resources

Streamline Your Development with Repeato

While resolving technical issues like these is crucial, focusing on your core development tasks is even more important. That’s where Repeato comes in. Repeato is a no-code test automation tool for iOS and Android that helps you create, run, and maintain automated tests for your apps quickly and efficiently.

With Repeato, you can delegate test automation to non-technical colleagues or QAs, allowing developers to concentrate on building a great product. Learn more about how Repeato can simplify your mobile app testing here.

Like this article? there’s more where that came from!