Monday, January 14, 2013

Eclipse - Failed to create Java Virtual Machine

Eclipse - Failed to create Java Virtual Machine.

I have downloaded eclipse and opened the IDE many times. Recently I was performing selenium webdriver setup on my friends machine and came across the following error.

In order to resolve this issue, I have updated the eclipse.ini file located in the eclipse folder, replaced      the  "-vmargs" with "-vm C:\Program Files\Java\jdk1.7.0_09\bin\javaw.exe", this solved the issue.

The order way is to create a short cut for  eclipse.exe and open the properties windows using right click and update the target path as shown below. This is similar to passing the command line arguments while opening the eclipse.