A JRE or JDK must be available in order to run Eclipse. No JVM was found after searching the following locations - H Y R Tutorials

A JRE or JDK must be available in order to run Eclipse. No JVM was found after searching the following locations

Share This
A JRE or JDK must be available in order to run Eclipse. No JVM was found after searching the following locations

If you are facing the below error then you are landed on a correct page.

A JRE or JDK must be available in order to run Eclipse. No JVM was found after searching the following locations

You might be working on eclipse before successfully without any errors, but suddenly now you are facing this issue.
Am I right?
Don’t get panic, because I have a solution for you.
This is due to any of the following reasons
  1. You indicated the wrong jvm path in your -vm argument of eclipse.ini file.
  2. The eclipse.ini file got corrupted somehow.
  3. The java which eclipse search by default is no longer accessible (because the $PATH is no longer up-to-date or modified/deleted)

Reason 1: You indicated the wrong jvm path in your -vm argument

Open eclipse.ini file and check whether you have jvm path in –vm arguments.
If it is present make sure it is pointing to the correct location.
If it is not present as shown in below figure, you can add the below line

A JRE or JDK must be available in order to run Eclipse. No JVM was found after searching the following locations

-vm
C:\jdk1.8.0_201\bin\javaw.exe

Reason 2: The eclipse.ini file got corrupted somehow.

In this case try replacing the eclipse.ini file with new one by taking a default template and modify the details according to your operating system and java version.
Below is the sample eclipse.ini format:
-startup
../../../plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.100.v20110502
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=256m
-Xms40m
-Xmx512m

Reason 3: The java which eclipse search by default is no longer accessible (because the $PATH is no longer up-to-date or modified/deleted)

This might be because of you have changed the $PATH or the $PATH has been deleted.
So please check your Environment variables.

A JRE or JDK must be available in order to run Eclipse. No JVM was found after searching the following locations

Here as you can see I’m referencing to the jdk folder but eclipse will by default look for jre location
So modify your JAVA_HOME Path or $PATH to point to jre.
Here is the modified Environment variables:

A JRE or JDK must be available in order to run Eclipse. No JVM was found after searching the following locations

Voila, I Hope you are able to open your eclipse now.