Can't start Eclipse - Java was started but returned exit code=13
Interview Questions practice on Codemia
Over 8,000 real interview questions from top companies, searchable by company and role.
When attempting to start the Eclipse Integrated Development Environment (IDE), encountering the error "Java was started but returned exit code=13" can be frustrating. This error typically arises due to a compatibility issue between the installed Java version and the architecture (32-bit or 64-bit) of your Eclipse IDE. Understanding and resolving this issue involves examining a few key system and software characteristics.
Understanding the Error
The exit code=13 error pops up mainly because of a mismatch between the versions and architectures of Eclipse and the Java Runtime Environment (JRE) or Java Development Kit (JDK) installed on your machine. Eclipse relies on the Java platform for running; hence, the harmonization between your system’s processor architecture and the Java version is critical for Eclipse’s operation.
Common Causes
- Architecture Mismatch: If you installed a 64-bit version of Eclipse and a 32-bit version of JRE/JDK, or vice versa.
- Incorrect Java Path Configuration: Eclipse might be pointing to an incorrect version of Java that is not compatible with its architecture.
- Outdated Software: Running older versions of either Java or Eclipse that do not support an available update might cause inconsistencies.
Step-by-Step Troubleshooting
- Check Eclipse and Java Versions: Confirm whether you are running 32-bit or 64-bit versions of both Java and Eclipse.
- To check Java's version, open a command prompt or terminal and type:
- For Eclipse, usually, 32-bit versions are labeled x86, and 64-bit versions are labeled x64 in their respective installation paths or file names.
- Update Java or Eclipse: Ensure both Java and Eclipse are updated to their latest releases from their official websites.
- Configure Eclipse to Use the Correct Java Path:
- Edit the ‘eclipse.ini’ file, which is found in the Eclipse installation directory.
- Make sure that the
-vmoption ineclipse.iniis pointing to the correctjavaw.exepath. The configuration should look like:
Ensure there's a line break between -vm and the path.
- Environment Variables: Adjust your system’s environment variables so that
PATHincludes the correct path to the needed Java version.
Example: Correcting the Path in eclipse.ini
Here's an example of adjusting the eclipse.ini to ensure it points to a JDK 11 installed on a Windows 64-bit machine:
Verifying the System Architecture
Run the following command in Command Prompt (Windows) or Terminal (Mac/Linux) to check if your CPU can run 64-bit applications:
- Windows:
wmic os get osarchitecture - Mac/Linux:
uname -m
If these outputs match with the version of Eclipse and Java installed (both should be either 64-bit or 32-bit), the setup should work without the error.
Summary Table
| Key Point | Detail |
| Error Code | Exit code=13 |
| Primary Cause | Mismatch in architecture between Eclipse and Java |
| Resolution Steps | Validate versions, update software, adjust paths |
| File to Modify | eclipse.ini |
| Commands to Check | java -version, wmic os get osarchitecture, uname -m |
Additional Tips
- When downloading a JDK or JRE, always verify its compatibility with your version of Eclipse.
- Regularly update both Java and Eclipse to minimize compatibility issues and benefit from the latest features and security enhancements.
- Always make a backup of configuration files like
eclipse.inibefore making changes.
In summary, the exit code=13 error in Eclipse typically points to a Java and Eclipse architecture mismatch. Properly verifying and configuring the compatible versions will resolve this startup error.
Related reading
- can't start eclipse - java was started but returned exit code=13
- Capture Image from Camera and Display in Activity
- Cardinal direction algorithm in Java
- Case insensitive string as HashMap key
- Can't start Kafka Connect with MongoDb plugin with Apache Kafka
- can't start rabbitmq-server after installation
- Cassandra 3.0 and later require Java 8u40 or later
- Cassandra Java Driver- QueryBuilder API vs PreparedStatements

OOD Fundamentals
Master object-oriented design from first principles, SOLID, design patterns, and classic interview problems with hands-on coding.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
Interview Questions practice on Codemia
Over 8,000 real interview questions from top companies, searchable by company and role.