1

I just downloaded eclipse, and when I open it I am getting an error "Alert Failed to create the Java Virtual Machine".

I have tried solutions that others have posted here but none seem to work. I also have Java version 1.7.

Here is my eclipse.ini file as well.

Thanks in advance for any help!

-startup
../../../plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.library
../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.200.v20140603-1326
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.7
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-XX:MaxPermSize=256m
-Xms40m
-Xmx512m
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
2
  • From the Terminal, what is the result of java -version? Commented Nov 26, 2014 at 21:23
  • @ElliottFrisch java version "1.7.0_09" Java(TM) SE Runtime Environment (build 1.7.0_09-b05) Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode) Commented Nov 26, 2014 at 22:31

2 Answers 2

2

I would add an explicite path to a compatible Java App:

-vm
/Library/Java/JavaVirtualMachines/jdk1.7.0_xx.jdk/Contents/Home/bin/java
-vmwargs
...

You must add the -vm lines before the existing -vmargs lines.

Modify the path to match your installed java, you can run java_home to find out. It needs to match the architecture of the Eclipse native parts.

Sign up to request clarification or add additional context in comments.

Comments

0

I found a solution. And it has been solved on my computer if you are using mac and JDK 11+ with STS or Eclipse follow these steps:

step1. rename libjli.dylib

cd /Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/MacOS sudo mv libjli.dylib libjli.dylib.bak

step2. create linked file for libjli.dylib sudo ln -s ../Home/lib/libjli.dylib libjli.dylib

step3. restart Eclipse.

This should be a bug for Eclipse and should be fixed in the next version of Eclipse.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.