How to Fix «Java Runtime Environment not found» error
In this post, we will solve the «Java Runtime Environment not found error». This java error is one of the common errors faced by developers or end-users. Whenever you try to install any software which requires java like eclipse or Minecraft. Also, if you are new to java development, JDK or Java Development Kit is necessary for you.
Following this tutorial will help you to resolve all Java runtime errors. Additionally, you will learn to install, remove and set java variables in Windows10 and Ubuntu.
These are the very common errors you will find related to Java.
- java runtime environment not found
- java runtime environment not found windows 10
- eclipse java runtime environment not found
- eclipse java runtime environment not found path
- java SE runtime environment not found
- java runtime environment not found at bin javaw.exe
- unable to load java runtime environment
- cannot determine a valid java home
- java runtime environment not found mac
Let’s understand some basic concepts of Java runtime first. Check out this post, if you are getting a java command not found error.
- What is a runtime environment?
- JRE vs JDK
- How to install Java runtime environment step by step
- How to install java runtime environment in Windows 10
- How to set the environment variable for java in windows10
- How to check what version of java I have?
- Video tutorial-JRE error solved for Windows
- How to install java runtime environment in Ubuntu 20.04
- A.) How to install java or JRE in Ubuntu 20.04 using the apt command
- How to Remove java from Ubuntu 20.04
- B.) How to install the latest java or JDK in Ubuntu 20.04 from oracle (manually)
- Java JRE download steps —
- How to set the «JAVA_HOME» variable in Ubuntu 20.04
- Remove java runtime environment package using dpkg command
- Video Tutorial — JRE error solved for Ubuntu
- Frequently Asked Questions (FAQs)
- Where is the java runtime environment on Windows 10?
- What does Java Runtime Environment do?
- What is the java runtime environment used for?
- What is the java runtime environment?
- How to set the java runtime environment in windows 10?
- Ending notes
- About The Author
- Dev
- Java Downloads
- JDK Development Kit 20.0.2 downloads
- Release information
- JDK Development Kit 17.0.8 downloads
- Release information
- GraalVM for JDK 20.0.2 downloads
- Release information
- GraalVM for JDK 17.0.8 downloads
- Release information
- Protect your investment—and more
- Java SE subscribers have more choices
- Java SE Development Kit 8u381
- JRE 8
- Server JRE 8
- Which Java 8 package do I need?
- Release information
What is a runtime environment?
- JRE (Java Runtime Environment)
- CLR (Common Language Runtime) for .net framework
The target would be JRE or CLR for your program, need to decide by you. As soon as you execute any program, it’s in run time.
JRE vs JDK
How to install Java runtime environment step by step
Let’s solve 1 st reason for «Java runtime environment not found», Because java is not installed.
First, check for any pre-installed java version —
Open the command prompt with «Run as administrator» and run java command.
How to install java runtime environment in Windows 10
Once Download completes. Browse to the «jdk-15.0.1_windows-x64_bin.exe» file and double-click on it, to run the installer. Click Next.
I recommend keeping «C:\Program files\java\jdk-15.0.1 (64-bit)» as the default installation folder. Select Next.
You may select different installation folders also. For example, if you are installing a second instance of java software. Click on change and browse for the target folder.
Let installation complete, it may take a few minutes.
Click close. Now you are done with java installation on windows 10.
How to set the environment variable for java in windows10
Set the Environment variable for java in windows 10 by these steps —
Type «environment» in the search window. Click «open» on «Edit the system environment variables«
Click on Environment variables.
Select «Path» > Then click Edit.
Select New > Give path of java installation directory > For example, «C:\Program files\java\jdk-15.0.1\bin» in my case. If you have selected a different folder for java installation in step4. You can enter your path to the bin folder.
Click OK.
Set «classpath» for java. Click «New» in the environment variable window. It allows to set up the new environment variables.
In «Variable name», enter «classpath«. Also in «variable value» provide path to your java installation till «lib» folder. In my case it is «C:\program files\java\jdk-15.0\lib > Select OK
Close all open environment variables windows by selecting OK.
How to check what version of java I have?
Installation and java variables have been set up. Now, Let’s validate the java installation and version.
Open the command prompt with «run as administrator» rights in windows 10.
Run the «java» command to check your Java and JRE (Java Runtime Environment) version.
Check java SDK version with javac command
Video tutorial-JRE error solved for Windows
«Java Runtime Environment not found» error fixed for windows 10
Select the java program and click Uninstall.
Java software will go from the window. You can clean up java variables also, set up in step10 and 11 earlier.
How to install java runtime environment in Ubuntu 20.04
There are two ways to download and install java or JDK in Ubuntu 20.04
A.) Using the apt command
B.) Download the Oracle JDK package and install it manually
Let’s see both options one by one-
A.) How to install java or JRE in Ubuntu 20.04 using the apt command
To install Java in Ubuntu using the repository, Follow these commands
Update package index using apt command
Check if you have any old java versions installed in the system. In my case, java is not installed.
Command ‘java’ not found, but can be installed with:
sudo apt install openjdk-11-jre-headless # version 11.0.9.1+1-0ubuntu1~20.04, or
sudo apt install default-jre # version 2:1.11-72
———————-output-truncated————————————
Run the «apt» command to install java or JRE. I will install default-jre version 2:1.11-72 in my Ubuntu system from the list.
$ sudo apt install default-jre
Select «Y» and press Enter. Let installation complete. it will take a few minutes.
Check the java version
output
How to Remove java from Ubuntu 20.04
Run apt command to remove JRE package installed. Press Y and then enter.
$ sudo apt autoremove "JRE package name"
B.) How to install the latest java or JDK in Ubuntu 20.04 from oracle (manually)
Java JRE download steps —
Visit oracle.com and download JDK 15 or the latest available .deb and transfer to your system. I am downloading Debian package jdk-15.0.1_linux-x64_bin.deb.
Alternatively, you can download java using wget command.
$ sudo wget "download link"
Reference output
Rename the .deb file using mv command, if required. Then install the Debian package using the dpkg command.
$ sudo dpkg -i ".deb-file-path"
output
Default installation directory path of java would be «/usr/lib/jvm/jdk-15.0.1/«. So, make a note of it, as it will be required to set up a Java_HOME variable.
How to set the «JAVA_HOME» variable in Ubuntu 20.04
Set the JAVA_HOME variable for all users in Ubuntu by editing the environment file.
Edit /system/environment file
Add path «/usr/lib/jvm/jdk-15.0.1/bin» to the last of the environment file. Then, save and exit.
Run source command to execute changes made in the environment file.
$ sudo source /etc/environment
Check your java version
Remove java runtime environment package using dpkg command
Run the dpkg command with the —purge option to completely clean java from Ubuntu 20.04
$ sudo dpkg --purge "package-name"
Video Tutorial — JRE error solved for Ubuntu
Video on «How to fix java runtime environment error in Ubuntu 20.04»
Frequently Asked Questions (FAQs)
Where is the java runtime environment on Windows 10?
The default installation folder for java runtime is «C:\Program files\java\jdk-15.0.1\bin» in the case of windows 10.
What does Java Runtime Environment do?
Java Runtime Environment (JRE) helps to run java programs like the eclipse.
What is the java runtime environment used for?
Java runtime environment helps to run java programs like Tomcat, eclipse and Jenkins.
What is the java runtime environment?
Java runtime environment JRE is a software that runs on the operating system. Which provides class libraries and resources to run java programs.
How to set the java runtime environment in windows 10?
Type «environment» in the search window. Click «open» on «Edit the system environment variables«
Click on Environment variables.
Select «Path» > Then click Edit.
Select New > Give path of java installation directory > For example, «C:\Program files\java\jdk-15.0.1\bin«
Click OK
Ending notes
I hope after reading this article, you will be able to solve the «Java Runtime Environment not found error». Because majorly reasons for java related errors are, either Java is not installed or the java variable is not set.
if you still have issues, please comment and let me know, I will try to help you.
About The Author
Dev
Hi, My Name is Dev and as an Information Technology professional, My Life revolves around Gadgets, Servers, Storage, Software, Operating system, Internet and Cloud computing. My philosophy is “being healthy” and follow your “passion or hobbies” to make your life interesting. Please feel free to contact me for any questions, feedback and suggestions.
Java Downloads
JDK 20 is the latest release of Java SE Platform and JDK 17 LTS is the latest long-term support release for the Java SE platform.
JDK Development Kit 20.0.2 downloads
JDK 20 binaries are free to use in production and free to redistribute, at no cost, under the Oracle No-Fee Terms and Conditions.
JDK 20 will receive updates under these terms, until September 2023 when it will be superseded by JDK 21.
Release information
JDK Development Kit 17.0.8 downloads
JDK 17 binaries are free to use in production and free to redistribute, at no cost, under the Oracle No-Fee Terms and Conditions.
JDK 17 will receive updates under these terms, until September 2024, a year after the release of the next LTS.
Release information
GraalVM for JDK 20.0.2 downloads
GraalVM for JDK 20 binaries are free to use in production and free to redistribute, at no cost, under the GraalVM Free Terms and Conditions.
GraalVM for JDK 20 will receive updates under these terms, until September 2023 when it will be superseded by GraalVM for JDK 21.
Oracle GraalVM uses the Graal just-in-time compiler and includes the Native Image feature as optional early adopter technology.
Native Image is extensively tested and supported for use in production, but is not a conformant implementation of the Java Platform. GraalVM for JDK 20 without the Native Image feature included is available for customers at My Oracle Support.
Release information
GraalVM for JDK 17.0.8 downloads
GraalVM for JDK 17 binaries are free to use in production and free to redistribute, at no cost, under the GraalVM Free Terms and Conditions.
GraalVM for JDK 17 will receive updates under these terms, until September 2024, a year after the release of the next LTS.
Oracle GraalVM uses the Graal just-in-time compiler and includes the Native Image feature as optional early adopter technology.
Native Image is extensively tested and supported for use in production, but is not a conformant implementation of the Java Platform. GraalVM for JDK 17 without the Native Image feature included is available for customers at My Oracle Support.
Release information
Script-friendly Download URLs
The URLs listed above will remain the same for update releases to allow their use in scripts.
Protect your investment—and more
Java SE subscribers get support for JDK 17, receive updates until at least October 2029, are entitled to GraalVM Enterprise, Java Management Service, and bundled patch releases (BPRs) with fixes not yet available to nonsubscribers, and more.
Java SE subscribers have more choices
Also available for development, personal use, and to run other licensed Oracle products.
Java SE Development Kit 8u381
Java SE subscribers will receive JDK 8 updates until at least December 2030.
The Oracle JDK 8 license changed in April 2019
The Oracle Technology Network License Agreement for Oracle Java SE is substantially different from prior Oracle JDK 8 licenses. This license permits certain uses, such as personal use and development use, at no cost — but other uses authorized under prior Oracle JDK licenses may no longer be available. Please review the terms carefully before downloading and using this product. FAQs are available here.
Commercial license and support are available for a low cost with Java SE Universal Subscription.
Java SE 8u381 checksums and OL 8 GPG Keys for RPMs
JRE 8
Java SE Runtime Environment 8u381
Server JRE 8
Server JRE (Java SE Runtime Environment) 8u381
Which Java 8 package do I need?
Software developers: Java SE Development Kit (JDK) For Java developers. Includes a complete JRE plus tools for developing, debugging, and monitoring Java applications.
Running headless Linux workloads at or near your systems’ CPU or memory limits Enterprise Performance Pack brings significant memory and performance improvements including modern garbage collection algorithms, reduced memory usage and many other optimizations. Learn more
Administrators running applications on a server Server Java Runtime Environment (Server JRE). For deploying Java applications on servers. Includes tools for JVM monitoring and tools commonly required for server applications, but does not include browser integration (Java plug-in), auto-update, or an installer. Learn more
End user running Java on a desktop: Java Runtime Environment (JRE) Covers most end-users needs. Contains everything required to run Java applications on your system.