Some users report getting the “registry refers to a nonexistent Java Runtime Environment” error when trying to open certain application executables. Most affected users report that this issue started to occur abruptly ( they where previously able to run the same executable without issues).
What is causing the “registry refers to a nonexistent Java Runtime Environment” error
We investigated the issue by trying to replicate the issue and looking at various user reports. This particular error message is an indicator that you have remnants from an old Java installation in your Registry editor.
Based on what we found, there are several common scenarios that will lead to the apparition of this issue:
- The Registry contains entries that don’t lead to the actual Java path – This typically occurs if you move the software to a different directory (manually) after the initial installation. The issue can be rectified by manually removing the registry entries that don’t correspond manually.
- Incomplete or corrupted Java Installation – Several users have managed to resolve this particular issue by uninstalling Java and then re-installing the JDK. User speculation suggests that a corrupted file or glitch might have caused this.
If you’re currently struggling to resolve this particular issue, this article will provide you with a collection of verified troubleshooting steps. Below you have several methods that other users in a similar situation have successfully used to resolve the issue.
For the best results, follow the methods below in order until you encounter a fix that resolves the problem in your particular scenario. Let’s begin!
Method 1: Removing inexistent registry entries for JavaHome and RuntimeLib
Several users encountering the same issue have managed to get the issue resolved by removing those JavaHome and RuntimeLib registry entries that don’t refer to an existent path.
Every JavaHome variable should refer to a path similar to \bin\client\jvm.dll while each RuntimeLib should refer to an existent jvm.dll file. But because this issue occurs, you might find one or multiple variables that do not have the corresponding path or file.
This might happen if you recently removed the software to another directory after you installed it. If you manage to find any registry variables, you’ll need them to remove them manually.
This procedure will require some manual work and a small amount of technical expertize, but it might allow you to resolve the issue without having to re-install the whole Java Runtime Environment. If you are prepared to go through with it, we have prepared a step by step guide through the whole thing. Here’s what you need to do:
- Press Windows key + R to open up a Run dialog box. Then, type “regedit” and press Enter to open up the Registry Editor. When prompted by the UAC (User Account Control), click Yes at the prompt.
- Inside the Registry Editor, use the left pane to navigate to the following location:
Computer \ HKEY_LOCAL_MACHINE \ SOFTWARE \ JavaSoft \ Java Runtime Environment
- Once you get there, select the first Java version located in the Java Runtime Environment folder and move over to the right pane.
- In the right pane, double-click on JavaHome and copy the entire Value data path to your clipboard.
- Open-File Explorer and paste the location you’ve previously copied in the navigation bar. If the location leads somewhere, it means that the registry value has a corresponding path. If it doesn’t lead you anywhere, it means that the registry refers to a non-existent Java installation and it should be deleted.
Note: If the Value data path dosen’t lead you anywhere, right-click on JavaHome and click Delete to get rid of the registry entry.
- Once JavaHome has been taken cared off, double-click on RuntimeLib and copy the Value data path in your clipboard.
- Same as before, open a File Explorer window and past the path you previously copied in the navigation bar. But this time, remove the last part “jvm.dll” before pressing Enter.
Note: If you find a corresponding path, it means that the RuntimeLib registry value is functioning correctly. In the event that you get a message saying that Windows is unable to find the path, the registry value refers to a non-existent Java installation and needs to be removed. In this case, right-click on RuntimeLib and choose Delete to get rid of the value.
- Once the first Java Runtime Environment version has been dealt with, repeat steps 4 to 7 with every Java version that you have left under Java Runtime Environment.
- Once all registry entries have been verified and addressed, close Registry Editor and restart your machine and see if the error has been resolved at the next startup.
If this method was not successful or you’re simply looking for a more simple fix, move down to the next method below.
Method 2: Uninstalling Java and installing the Java JDK
If you’re encountering this issue when trying to launch Minecraft or a similar application that relies on the JDK, you might be able to resolve the issue by uninstalling the whole Java environment and then re-installing the JDK (Java Development Kit).
Here’s a quick guide on how to do this:
- Press Windows key + R to open up a Run dialog box. Then, type “appwiz.cpl” and press Enter to open up Programs and Features.
- Inside Programs and Features, click on the Publisher column, then scroll down to the entries published by Oracle Corporation.
- Next, proceed to uninstall every Java installation (or update) by right-clicking on each entry and clicking Uninstall. Then, follow the on-screen prompts to complete the uninstallation with each entry.
- Once you uninstall the Java environment completely, restart your computer.
- At the next startup, visit this link (here) and click on on the Download button.
- In the next screen, scroll down to Java SE Development Kit and click the toggle associated with Accept Licence Agreement. Then, click on the executable download link associated with Windows.
- Open the JDK installer and follow the on-screen prompts to install the JDK environment on your PC. Restart your computer if not automatically prompted to do so when the process is complete.
- At the next startup, you should be able to start the application without encountering the “registry refers to a nonexistent Java Runtime Environment” error.