Eclipse No Java Virtual Machine was found Windows/Ubuntu JRE JDK 64/32 bits

In the tutorial we will see how to fix error Java Virtual Machine was found

In many times while configure new machine for development, we need to configure our favorite IDE .i.e Eclipse. We install java set JAVA_HOME etc.

But after doing all these things ,when we run eclipse ,many of us get error like

"A java Runtime Environment (JRE) or Java Development kit (JDK) must be available in order to run Eclipse. No Java virtual machine was found" 

While installing JDK because it comes with bundled JRE. Once you install JDK, its good to set your JAVA_HOME environment variable, and include JAVA_HOME/bin into your PATH.

To fix this issue we have.

Add the entry of vm above the vm args else it will not work..! i.e

For windows

-vm C:\Program Files\Java\jdk1.8\bin\javaw.exe --launcher.appendVmargs -vmargs -Dosgi.requiredJavaVersion=1.8 -Xms40m -Xmx512m

For Linux

-vm /usr/lib/jvm/java-8-oracle/bin -vmargs -Dosgi.requiredJavaVersion=1.8 -Dosgi.instance.area.default=@user.home/eclipse-workspace -XX:+UseG1GC -XX:+UseStringDeduplication

Sample eclipse.ini file for Linux/Ubuntu

-startup plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar --launcher.library plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.551.v20171108-1834 -product org.eclipse.epp.package.java.product -showsplash org.eclipse.epp.package.common --launcher.defaultAction openFile --launcher.defaultAction openFile --launcher.appendVmargs -vm /usr/lib/jvm/java-8-oracle/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 -Xms256m -Xmx1024m --add-modules=ALL-SYSTEM

The other steps are:

1). Check you are running on x32 or x64 Windows or Linux operating systems.

2). Check if you have JRE or JDK installed in your machine or not. If not then install correct JDK or JRE i.e. 32 bit/ 64 bit JDK and JRE.

3). Verify that JRE or JDK is in your system PATH or not.

4). Check if both JRE and Eclipse come as 32 bit and 64-bit flavor. If you are running on 64 bit Ubuntu/Windows e.g Windows 10 x64/Ubuntu x64 and trying to install Eclipse 64 bit version, than you need a 64 bit JRE or JDK.

5). If you are running on 32 bit Windows operating system e.g. Windows 10 x86 or Ubuntu 18.04 | 20.04 than you need to use 32 bit Eclipse and 32 bit JDK or JRE version to launch Eclipse.

6). If you have multiple JDK and JRE installed in your machine, and your PATH contains location to those JDK and JRE, than Eclipse will pick the first one from PATH. This can create issues if you are running 64 bit Eclipse, and 32 bit JDK comes earlier in PATH of your windows 7 machine.

Question/Articles related Java Virtual Machine was found

Install | Set JAVA_HOME in Ubuntu 19.10 | 20.04
How to install Maven on Ubuntu 19.10 | 20.04
How to remote debug Java application in Eclipse?
How to attach source code for JAR file in Eclipse?
How to Increase Heap Size of Java Program running in Eclipse?
No java virtual machine was found tomcat install
Java virtual machine launcher error eclipse
The required 64-bit java 1.8.0 virtual machine could not be found
Eclipse could not create the java virtual machine

In this article, we have seen the  Eclipse No Java Virtual Machine was found Windows/Ubuntu JRE JDK 64/32 bits