No Java virtual machine was found (Eclipse)

eclipse

Solution

The problem is that you are trying to start a 64 bit version of Eclipse with a 32 bit version of Java. The bitness should match. You can download 64 bit Java here

Start Eclipse with a 64 bit JVM and the problem will go away.

To do so:

eclipse.exe -vm c:\path\to\64\bit\bin\javaw.exe

You can also update the the first two lines in your `eclipse.ini` file to use the 64 bit java by default by doing the following:

-vm
c:\path\to\64\bit\bin\javaw.exe

(NOTE: be sure the argument and value each exist on a separate line)

Also, you can also download a 32 bit version of Eclipse for use with 32 bit Java. The key is that the bitness is the same.

Problem

When trying to run Eclipse Kepler (for the first time), I get the following error: I am aware that this issue has been solved many times before. However, I have changed eclipse.ini to say `-vm C:\Program Files (x86)\Java\jdk1.6.0_21\bin\javaw.exe` but to no avail. The same error always comes up. ===UPDATE=== I added a line break after `-vm` and now I get this dialog box: and the eclipse.ini file: ``` -vm C:\Program Files (x86)\Java\jdk1.7.0_51\jre\bin\javaw.exe -startup plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20130807-1835 -product org.eclipse.epp.package.java.product --launcher.defaultAction openFile --launcher.XXMaxPermSize 256M -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m --launcher.defaultAction openFile --launcher.appendVmargs -vmargs -Dosgi.requiredJavaVersion=1.6 -Xms40m -Xmx512m ```

Original source