Installed several versions of java and java, but returned exit code = 13

I can not start eclipse on Windows 7. It worked well yesterday. Here is a screenshot of the error when starting eclipse:

Eclipse error when starting eclipse

Java versions from CMD

java and javac versions

Why does it give different versions for java and javac ?

My java home is installed in Jdk 7, as shown below:

JAVA_HOME = C:\Program Files\Java\jdk1.7.0_60

Note. I have jdk 8 installed on my machine, but I have not installed the jdk 8 path.

This question has been asked a couple of times, but I cannot solve it on my machine, so please do not mark it as a duplicate.

+4
source share
5 answers

In environment variables, check your path to see if it starts with C:\ProgramData\Oracle\Java\javapath

if so, delete it and try again

+4
source

Most likely you installed JDK 1.70_60 before installing JRE 1.8.0_51 .

This means that your javac compiler is in the JDK (Java Development Kit) distribution, and your java runtime is in the recently loaded JRE (Java Runtime Environment). JRE does not contain javac (Java compiler).

+3
source

I recently ran into the same problem, the Java 8 installer adds the Windows PATH variable C:\ProgramData\Oracle\Java\javapath , so you see different versions for java and javac

+2
source

Your eclipse may not point to the right JDK.

Open the eclipse.ini configuration file for editing. This can be found in the same folder with the eclipse.exe file.

replace:

 -vm C:\ProgramData\Oracle\Java\javapath\javaw.exe 

from:

 -vm C:/Program Files/Java/jdk1.7.0_60/bin/javaw.exe 

Then restart eclipse.

+1
source

I recently installed jdk 8. The Java 8 installer adds the Windows PATH variable C:\ProgramData\Oracle\Java\javapath , and for this reason I saw different versions for java and javac

For those working on the same issues, I found a nice explanation here

0
source

All Articles