Can not create java virtual machine popup message in eclipse

12.5k views Asked by At

I want to log the GC details and added following VM argument in eclipse:

-verbose:gc 
-XX:+PrintGCDetails
-XX:+PrintGCTimeStamps
-Xmx768M 

Now when I launch the application I get an error dialog that states "can not create java virtual machine".

What is the problem?

4

There are 4 answers

0
Emran Hamza On

I have found very easy solution for this just delete eclipse.ini file but backup first.

i had this same problem many times and finally i deleted this and i have no more problem.

it also increased loading time. now my eclipse starts faster then earlier.

0
Chander Shivdasani On

The following link explains how to supply VM arguments in eclipse.

Now when I launch the application I get an error dialog that states "can not create java virtual machine".

There could be quite a few reasons for this. One common one is that eclipse cant find the java executable. You can open the eclipse.ini file and add:

-vm
 /opt/jdk/bin/javaw.exe 

You should replace the above path with the path of your executable.

0
Shanker Kaura On

Check to see if you have multiple entries for "-vm" in your eclipse.ini file. Multiple entries will cause this error to appear.

0
dev-vb On

We were facing a similar problem. We uninstalled java 7 and replaced it with java 6 (http://www.java.com/en/download/manual_v6.jsp) and this worked for us. (above suggested changes - editing .ini file with vm, etc. - didn't work for us! it just brought up a different error message).

One issue we did face is in getting 'java -version' in command prompt to work. We were seeing the following error: "java error in opening registry key". The selected answer (removing java.exe, etc. files from windows/system32 folder) at the following link worked and we were good to go.

Java Error opening registry key