Michael Lafayette
Michael Lafayette

Reputation: 3072

Eclipse: No Java virtual machine was found after searching the following locations: /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/

I opened Eclipse:

Open Eclipse

I got this Error:

Eclipse Error

My OS:

Mac 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

Answers (4)

user18608968
user18608968

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

Swapnil Gaikwad
Swapnil Gaikwad

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.

  1. Open eclipse package. Open package contents
  2. Open eclipse.ini file in /Content/Eclipse folder
  3. Open terminal and type ls -l /usr/bin/java
  4. Replace -vm parameter with the symlink from the terminal. It would most probably be /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands

Upvotes: 2

Maicoly Morocho
Maicoly Morocho

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

Michael Lafayette
Michael Lafayette

Reputation: 3072

Change "jdk1.8.0_121" to "jdk1.8.0_131" in eclipse.ini

eclipse.ini

Upvotes: 5

Related Questions