Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No Java virtual machine was found (Eclipse)

Tags:

eclipse

When trying to run Eclipse Kepler (for the first time), I get the following error:

enter image description here

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: enter image description here

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
like image 857
Insederec Avatar asked Feb 11 '14 02:02

Insederec


People also ask

Does Eclipse Need Java_home?

In this case, the Java Virtual Machine found in the JAVA_HOME path will run Eclipse IDE. So changing the Java version that run Eclipse is just a matter of updating the value of the JAVA_HOME variable.


2 Answers

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.

like image 180
cmd Avatar answered Sep 28 '22 05:09

cmd


You are pointing your 64-bit Eclipse at a 32-bit Java installation. They need to match. You can either get and use the equivalent 32-bit Eclipse download or make sure you install a 64-bit Java.

like image 29
nitind Avatar answered Sep 28 '22 06:09

nitind