Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse - Failed to create the java virtual machine

Tags:

java

eclipse

I'm having issue with running my Eclipse with the following config:

eclipse.ini

-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256M
--launcher.defaultAction
openFile
-vm
jdk1.7.0_02/bin
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms256M
-Xmx1024M

# Adding this line, I get "Failed to create virtual machine"

-XX:PermSize=512M
-XX:MaxPermSize=512M
-XX:+UseParallelOldGC
-XX:ParallelGCThreads=2
-XX:ThreadPriorityPolicy=1
-Xverify:none
-XX:-UseSplitVerifier

The above configuration works except when I add the lines I specified above. What could be the problem?

I am running eclipse from a Windows 7 (64-bit) machine with 4GB ram, although the JDK I specified in the path is 32-bit which works just fine. The only problem is if I add those additional config parameters.

like image 904
quarks Avatar asked Jan 29 '13 07:01

quarks


People also ask

How do I fix a failed to create Java Virtual Machine?

You can also solve this issue by removing the value "256m" under the line "-launcher. XXMaxPermSize". Deleting eclipse. ini worked from me, i think eclipse will require it in future.

Can't create Java Virtual Machine A fatal exception has occurred Eclipse?

In the File Explorer window, right-click the Java executable file and select Properties. 4. At 'java Properties" window select the Compatibility tab and below the Settings pane, check the box Run this program as an administrator. Then click Apply and OK.

Can't install Java could not create Java Virtual Machine?

The most common cause for the “Could not create the Java Virtual Machine” error is that Java doesn't have enough available memory on your system to launch the VM client.


3 Answers

There are two place in eclipse.ini that includes

--launcher.XXMaxPermSize
256m

make it

--launcher.XXMaxPermSize
128m
like image 107
Nevin Chen Avatar answered Oct 09 '22 21:10

Nevin Chen


I had exactly the same problem, one day eclipse wouldn't open. Tried editing eclipse.ini to the correct java version 1.7, but still the same error. Eventually changed :

-Xms384m 
-Xmx384m

...and all working.

like image 29
Benno Avatar answered Oct 09 '22 20:10

Benno


it works for me after changing MaxPermSize=512M to MaxPermSize=256M

like image 6
siva Avatar answered Oct 09 '22 21:10

siva