Reputation: 3072
I opened Eclipse:
I got this Error:
My OS:
Text:
A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse.
No Java virtual machine was found after searching the following locations: /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/bin
Upvotes: 4
Views: 7854
Reputation: 1
Maybe tweaking the Java path (in my case it was the Java version) in /Applications/Eclipse.app/Contents/info.plist solves the problem.
Upvotes: 0
Reputation: 21
When you encounter this error, most probably you or system has updated the Java and the path for the Java virtual machine has changed. Updating the VM path as other answers work but you will have to repeat the same exercise again when Java version updates again. Following is the solution I use to get out of this cycle.
ls -l /usr/bin/java
-vm
parameter with the symlink from the terminal. It would most probably be /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands
Upvotes: 2
Reputation: 159
In something version of eclipse the path for eclipse.ini: /Eclipse.app/Contents/Eclipse/eclipse.ini
put this:
/Library/Java/JavaVirtualMachines/VERSION.jdk/Contents/Home/jre/bin/
Upvotes: 3