Eclipse and Failed to create the Java Virtual Machine

One day I went to open Eclipse (Helios) as usual and was surprised to see that a dialoge box popped up saying:

Failed to create the Java Virtual Machine.

Not only that but Eclipse wouldn't start. I've read that changing the eclipse.ini file would help, below are a few solutions that worked for others.

Solution 1 (Failed)

Add the following to eclipse.ini file, changing the location to point to your javaw.exe file:

C:\Program Files\Java\jdk1.6.0_22\bin\javaw.exe

So you should end up with something similar to this:

C:\Program Files\Java\jdk1.6.0_22\bin\javaw.exe

Solution 2 (Failed)

Remove the value under –launcher.XXMaxPermSize  such as 256m.

Solution 3 (Worked)

Remove or lower the values of Xms and Xmx, for example:


A good article I found about tuning Eclipse can be found here.