Error when launching Eclipse IDE - Failed to create the Java Virtual Machine

When I installed the Eclipse IDE and tried to launch it, I came across the following error: "Failed to create the Java Virtual Machine".

To fix this, go through the following steps:

1. Navigate to the Eclipse installation folder

2. Open eclipse.ini with a notepad editor (Create a backup of this file first!).

3. The original eclipse.ini file will look like the following:

4. Make note of the 'requiredJavaVersion' entry and ensure you have a jdk installed meeting that version. In this example, it is 1.8, so i installed jdk1.8.0_171 under "C:\Program Files\Java"

Before the -vmargs line, insert the following entry:

-vm
C:\Program Files\Java\jdk1.8.0_171\bin\javaw.exe

Note: Replace the path to your installed jdk version appropriately.

Your modified eclipse.ini will now look something like the following:


5. Save your file.

6. Try running Eclipse.exe again and voila! :)