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:

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

So you should end up with something similar to this:

-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.1.R36x_v20100810
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
C:\Program Files\Java\jdk1.6.0_22\bin\javaw.exe
-vmargs
-Xms40m
-Xmx384m

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:

-Xms384m 
-Xmx384m

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