Reputation: 53
I'm running MacOS 10.9. A while ago I upgraded to Java 1.8, and in the process had to rebuild the links in /System/Library/Frameworks/JavaVM.framework (because I screwed up).
I ended up with this symlink:
/System/Library/Frameworks/JavaVM.framework/Versions/A/Commands -> /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/bin
That enabled me to run java from the command line.
Now I want to run Eclipse. I installed it but it won't start up; it gets this error:
Library not loaded: /System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM
So I think I need a symlink "JavaVM" pointing somewhere in the jdk1.8.0_31.jdk directory structure, but I can't figure out where.
Thanks much for any help..
Upvotes: 3
Views: 587
Reputation: 11658
If you get a VM info like java version "1.8.0_31"
when running java -version
from your shell and assuming you have eclipse unpacked in your Applications
folder you could try the following:
Applications
> Eclipse
folder. eclipse
and select Show Package Contents
.Contents
> MacOS
folder.eclipse.ini
file with your favorite text editor.Search for the -Dosgi.requiredJavaVersion key under -vmargs and set it to 1.8, like so:
-Dosgi.requiredJavaVersion=1.8
Save it and try opening eclipse again.
In my environment, besides installing it normally using the Java installer, I also have the following in my ~/.bash_profile file:
export JAVA_HOME=$(/usr/libexec/java_home)
Upvotes: 1
Reputation: 51
in eclipse go to preferences. then go to Java -> Build Path -> Installed JREs. then click search on the right hand side and it should be there. Make sure the one you want is clicked. I had the same problem before too.
Upvotes: 1