Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse error: 'Failed to create the Java Virtual Machine'

Tags:

eclipse

jvm

1. Open the eclipse.ini file from your eclipse folder,see the picture below.

eclipse.ini

2. Open eclipse.ini in Notepad or any other text-editor application, Find the line -Xmx256m (or -Xmx1024m). Now change the default value 256m (or 1024m) to 512m. You also need to give the exact java installed version (1.6 or 1.7 or other).

max size

Like This:

-Xmx512m
-Dosgi.requiredJavaVersion=1.6

OR

-Xmx512m
-Dosgi.requiredJavaVersion=1.7

OR

-Xmx512m
-Dosgi.requiredJavaVersion=1.8

Then it works well for me.


Try to add

-vm
D:\Java\jdk1.6.0_29\bin\javaw.exe

FYI: Refer sunblog

For others who might have problems with Java 7, as per Eclipse Wiki - eclipse.ini vm_value (windows example)

This might not work on all systems. If you encounter "Java was started but returned exit code=1" error while starting the eclipse, modify the -vm argument to point to jvm.dll

e.g.

-vm
C:\Program Files\Java\jre7\bin\client\jvm.dll

Also note that

The -vm option must occur before the -vmargs option, since everything after -vmargs is passed directly to the JVM


Try removing the -vm P:\Programs\jdk1.6\bin lines.


Also, a general recommendation: set -Dosgi.requiredJavaVersion=1.6, not 1.5.


I know this is pretty old now but I have just had the same issue and the problem was I was allocating to much memory to eclipse that it could not get hold of. So open eclipse.ini and lower the amount of memory that is being allocated to -Xmx XXMaxPermSize I changed mine to -Xmx512m and XXMaxPermSize256m


I removed eclipse.ini. I encountered this issue and removing the ini file solved it.


  1. Open the eclipse.ini file from your eclipse folder.

  2. It has some of add on configuration . Find the line –launcher.XXMaxPermSize. Now remove the the default value 256m and save it.


  1. Open folder with Eclipse.exe and find eclipse.ini file
  2. Replace -vmargs by your current real path of javaw.exe: *-vm “c:\Program Files\Java\jdk1.7.0_07\bin\javaw.exe”*

    -startup
    plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
    --launcher.library
    plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120522-1813
    -product
    com.android.ide.eclipse.adt.package.product
    --launcher.XXMaxPermSize
    256M
    -showsplash
    com.android.ide.eclipse.adt.package.product
    --launcher.XXMaxPermSize
    256m
    --launcher.defaultAction
    openFile
    **-vm “c:\Program Files\Java\jdk1.7.0_07\bin\javaw.exe”** 
    -Dosgi.requiredJavaVersion=1.6
    -Xms40m
    -Xmx768m
    -Declipse.buildId=v21.1.0-569685