Eclipse can't start - Java was started but returned exit code=13 - couldn't find a Java VM called javaw.exe inside the Eclipse folder


This problem can happened even in new/fresh installation of Eclipse.
It means it is NOT the Eclipse that is broken but there is some problem in the Eclipse dependency in this case Java.

Why this happened?

In the nutshell there is mismatch between your:
OS bit VS Eclipse bit VS Java bit
So the problem is on the bitness between those 3 things.

What you have to know about Java and Eclipse relationship

1.       Eclipse is the IDE that commonly used for Java development (but Java Development is NOT the only 2. thing Eclipse supports).
2.       Eclipse REQUIRES Java to run , that is THE IDE on its own requires Java to run.
3.       You as user can install MORE THAN ONE Java versions in your machine:
o    If you were running on x64 bit OS , you can install many versions of Java EITHER x86 AND x64 of Java. So yeah on x64bbit OS, you can install  say JDK 8 x86 and JDK 8 x64 altogether.
o    If you  were running on x86 bit OS, you can install many versions of Java BUT ONLY x86 version of Java. So in x86 bit OS you can install only, say JDK 8 x86 version BUT NOT JDK x64
4.       Most of the time if you have multiple Java versions installed on your machine , it will affect all apps that requires Java as it’s dependency. This is true for every apps not only Eclipse.

Should I install only ONE version of Java only?

Hell, NO.
That’s won't fix the problem. You can install many versions of Java since in real world case we often need different Java versions for different purpose and scenario.

Pre Solution : Working Combination on OS + Eclipse + Java version

This are the combination that make Eclipse runs correctly . Make sure you checked this before go to solutions.
Your OS Arch
Java JDK Arch you can install
Eclipse Arch you can install
32-bit
32-bit
32-bit
64-bit
32-bit
32-bit
64-bit
64-bit
64-bit
If you’re curious on Eclipse Arch , read more How to check if my Eclipse is 32bit or 64bit [x86/x64]?
If after checking the combination above you still go the error, then check the solutions below.

ALL POSSIBLE SOLUTIONS you should try!


Solution 1: Install newer version of Java

If you have newer version of Eclipse chances are you need newer version of Java. Even if your combination of OS+JDK+Eclipse arch is correct, newer Eclipse releases are usually based on newer Java architecture.
If you are using Java  6 o Java 7 we recommend you to install the latest updated path of JDK 8 / Java 8 as this is the bare minimum version of most recent version of Eclipse.

Solution 2: Perform clean re-install Java

Sometimes, being clean is all what you need:
·         Try to uninstall Java first
·         then optionally clean  your system registry
·         Restart your system
·         Re-install Java
·         Now ,start Eclipse normally

Solution 3: refine your Eclipse dir name

Make sure your eclipse installation directory name does NOT CONTAIN any of the following characters:
·         !
·         #
·         @


Solution 4: Remove Oracle javapath  from your system environment
The Oracle javapath entry is common if you have multiple JDK installed on your machine. To get rid of it:
·         From "Run" or CMD, type control sysdm.cpl,,3 this will open Environment Variables 
·         On System Variables look at "path" variable then edit.
·         On "value" look at C:\ProgramData\Oracle\Java\javapat;
·         Remove that entry , then hit OK, Apply and close 
·         Now , start Eclipse normally
Notice:
·         Removing Oracle javapath from your System Env will NOT HARM anything related to your JDK installation.

Solution 5: specify explicit Java VM on eclipse.ini

This will ensure Eclipse that it will run under specific Java VM only in case there are more than JDK installed on your system.
First notice that:
·         The -vm option and its value (the path) must be on separate lines.
·         The -vm option must occur after the other Eclipse-specific options (such as -product, --launcher.*, etc), but before the -vmargs option, since everything after -vmargs is passed directly to the JVM.
·         The value must be the full absolute or relative path to the Java executable, not just to the Java home directory.
·         The value should NOT contains any spaces
·         We recommend the value is linked to javaw.exe inside JDK dir and NOT JRE dir

.. so to specify VM for your eclipse:
·         Go to your Eclipse installation directory
·         Open up eclipse.ini using a text editor, Notepad is Okay
·         First find "-vmargs"
·         Then put -vm and path to VM just before -vmargs
For instance in our case we have JDK 8 installed at C:\Program Files\Java\jdk1.8.0_192\bin\javaw.exe
Because value should NOT contains any spaces to avoid farther error , we use %programfiles%.
Example:
-vm
%programfiles%\Java\jdk1.8.0_192\bin\javaw.exe



Suggestion in case you were interested : Use Eclipse  Installer

After years of Eclipse development , they finally includes installer  to simplify the installation of Eclipse.
This installer will select proper packages that is compatible with your OS, including its bitness so hopefully the problem like that is minimized.

That’s all!




Comments