Menu

No Java virtual machine was found

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: C:\Program Files\Java\jre1.8.0_221\bin




Cause of error: when we update the Java version, or install a new version of Java in machine.


Solution: We need to manually update path of current JRE or JDK path in Eclipse setting file.


Where I can find the Eclipse setting file?

Directory: C:\Users\rashidjorvee\eclipse\jee-2019-06\eclipse\eclipse.ini
Below is the sample of eclipse.ini file. You may open this file using notepad and notepad++.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
-startup
plugins/org.eclipse.equinox.launcher_1.5.400.v20190515-0925.jar
--launcher.library
C:\Users\username\.p2\pool\plugins\org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.1000.v2019882098-2010
-product
org.eclipse.epp.package.jee.product
-showsplash
org.eclipse.epp.package.common
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vm
C:/Program Files/Java/jre1.8.0_221/bin
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=@user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=1.8
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms256m
-Xmx1024m
--add-modules=ALL-SYSTEM
-Declipse.p2.max.threads=10
-Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest
-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/

In eclipse.ini file please update the correct JRE or JDK path at line number 13 under the -vm (virtual machine) and then save the file.

This will fix your issue and you will be now able to open the eclipse IDE without any issue.

Where to find the installed JDK and JRE in machine?

In windows inside the profile files >> Java, you will find the installed JRE and JDK.

e.g. path of a JDK version 1.8 : C:\Program Files\Java\jdk1.8.0_221\bin

1 comment:

  1. Thanks For Sharing Such Great Information, It's Really Nice And Informative.
    DevOps Training
    DevOps Online Training

    ReplyDelete