Are you getting below eclipse startup error?
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/
Well, today I found the same error while starting up Eclipse locally on my Mac. I have been using Eclipse since last 10 years and never faced this error before.
I immediately correlated this error with the some JRE and JDK un-installation did last week 🙂
Basically, over time I had installed Java 8, Java 9 and Java 10. When I went to folder
/Library/Java/JavaVirtualMachines I saw total 3 folders with respective JDK setup for Java 8, 9 and 10.
In order to avoid conflict I have decided to remove old Java versions 8 and java 9. I did it by simply
deleting 2 folders.
As my Eclipse’s
eclipse.ini file had Java 9 by default as a VM. It failed to startup with above error message.
How to find eclipse.ini file?
- Right click on
- Click on Show Package Contents
- Go to folder
- You will find
How to fix Eclipse Startup Error?
You have open eclipse.ini file and change
-vm path to correct JDK location.
In my case it’s
Now try restarting your eclipse by clicking eclipse.app icon and error should go away. Let me know if you face any issue starting Eclipse application.
Keep updating to latest Java version every 6 months. It’s my suggestion to get all latest features of Java and keep updating your project.