Can't install Eclipse - "Failed to create the Java Virtual Machine" on Mac

Brad Parks :

I'm trying to install Eclipse, but I can't get the installer to start. It fails with

"Failed to create the Java Virtual Machine"

How can I resolve this?

Note: I'm on Mac.

Brad Parks :

For me, I had to edit the eclipse-inst.ini file located here:

Eclipse Installer.app/Contents/Eclipse/eclipse-inst.ini

and add the path to my local java VM, which is here:

-vm
/Users/bparks/jdk/jdk1.8.0_162_x64/bin/java

If the Eclipse Installer.app file is in a DMG, right click on it, and copy it, then paste it into another folder. Then right click on that app file, and choose "Show Package Contents", to get into the files inside the application.

If you've already got Eclipse installed, and find it's throwing the same error, you could try a similar approach by editing the following file for Eclipse:

/Applications/Eclipse.app/Contents/Eclipse/eclipse.ini

On mac, you can get the full path you'd need to your java exe by running the following in a terminal, which will copy the path to your clipboard.

$ echo $(/usr/libexec/java_home)/bin/java | pbcopy

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=464660&siteId=1