Sunday, August 14, 2011

Failed to create Java virtual machine

Source :

When you runt the eclipse (latest version eclipse-jee-indigo win32) , you may get the error "failed to create java virtual machine" .

This error can be solved by many ways. Assume that the eclipse is installed at the locaton d:\eclipse and Jdk is installed at the location D:\jdk1.6.0_23 

Ist Method

1. Open the ecplise.ini file which is located in the eclipse installation folder. (i.e in our example : d:\eclipse)
2. Find & Replace the line -vmargs with -vm D:\jdk1.6.0_23\bin\javaw.exe OR just remove the line -vmargs and save it . Now the problem is solved

IInd Method 

1. Create a desktop shortcut of the eclipse.exe
2. Right click on the shortcut and select properties.
3. Now the following dialog box will open. 

4. In the target textbox already d:\eclipse\eclipse.exe will be there. Now replace with D:\eclipse\eclipse.exe -vm D:\jdk1.6.0_23\bin\javaw.exe

III rd Method

1. Open the ecplise.ini file
2. It has some of add on configuration . Find the line "–launcher.XXMaxPermSize”. Now remove the the dafault value 256m and save it. 

1 comment: