A JRE or JDK must be available in order to run Eclipse. No JVM was found after searching the following locations

David Smith picture David Smith · Dec 12, 2010 · Viewed 381.1k times · Source

Eclipse is unable to open, have used eclipse before and has open before without a problem. Now I keep getting the following error message:

A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No Java virtual machine was found after searching the following locations:

Have gotten eclipse to open and work on projects before and won't open.

Here is a screen shot of what I keep getting:

enter image description here

Answer

BalusC picture BalusC · Dec 12, 2010

You can explicitly tell Eclipse where to find it. Open eclipse.ini and add the following lines to the top of the file:

-vm
/absolute/path/to/jre6/bin

Update: I just nailed down the root cause on my own Windows machine. The GlassFish installer complained with exactly the same error message and after digging in GlassFish forums, the cause was clear: a corrupt JRE install on a Windows machine. My JRE came along with the JDK and the Java 6 JDK installer didn't install the JRE properly somehow. A DLL file was missing in JDK's JRE installation. After I reinstalled the standalone JRE from http://java.com, overwriting the old one, the GlassFish installer continued and also Eclipse was able to start flawlessly without those two lines in eclipse.ini.