Could Not Find Java SE Runtime Environment
The Could not find Java SE Runtime Environment
error can occur when there is Runtime Environment installed, i.e., Java cannot find the main java.dll
file. This tutorial demonstrates how to solve the Could not find Java SE Runtime Environment
error in Java.
Fix the Could not find Java SE Runtime Environment
Error in Java
When we are trying to open a Java file through a command prompt, the Could not find Java SE Runtime Environment
error can occur if it doesn’t find the Runtime Environment. The error that occurs is given below.
The reason for this error can be:
- The registry is corrupted.
- The Java path is missing in the Environment Variables.
- Java installation folder is moved.
- The
java.dll
file is deleted or moved.
It is easy to fix this error; we must address the above reasons. All the reasons above can be solved by deleting and reinstalling the Java on your system.
Follow the steps below.
-
Delete all the previously installed versions of Java. It can be done through the
Programs and Features
uninstall option. -
Clean the registry by deleting the Java key.
-
Open the Registry Editor
Regedit
from theStart
menu. WriteRegedit
in run and start it. -
Go to
HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Uninstall
. -
Right-click on the
Uninstall
and clickFind
. -
Type your current Java version and find.
-
Once the key is found. Right-click on it and choose the delete option and confirm it.
-
Once the Java key is deleted, we can reinstall Java.
-
Download the latest version of Java from here.
-
Set the Environment Variable correctly. After setting, you can check it by the command
echo %JAVA_HOME%
.JAVA_HOME - C:\Program Files\Java\jdk-17.0.2 Path - C:\Program Files\Java\jdk-17.0.2\bin
-
Once the new version of Java is installed successfully and the Environment Variable is set, the
Could not find Java SE Runtime Environment
will be solved. -
Check by running the command
java -version
.
All the reasons described above for the Could not find Java SE Runtime Environment
error will be solved by following the process described in the steps.
Sheeraz is a Doctorate fellow in Computer Science at Northwestern Polytechnical University, Xian, China. He has 7 years of Software Development experience in AI, Web, Database, and Desktop technologies. He writes tutorials in Java, PHP, Python, GoLang, R, etc., to help beginners learn the field of Computer Science.
LinkedIn FacebookRelated Article - Java Error
- Fix the Error: Failed to Create the Java Virtual Machine
- Fix the Missing Server JVM Error in Java
- Fix the 'No Java Virtual Machine Was Found' Error in Eclipse
- Fix the Error: Failed to Create the Java Virtual Machine
- Javax.Net.SSL.SSLHandShakeException: Remote Host Closed Connection During Handshake
- Java.Lang.VerifyError: Bad Type on Operand Stack