This could be due to several factors, including but not limited to:

Corrupted registryMissing Java path in your Environment VariablesJava installation folder being moved

For example, we encountered this issue when updating Java SE to the latest version – we likely previously had a 32-bit Java installation, and when running the 64-bit Java installer, our Java path changed. Luckily, this is fairly easy to fix, as it just requires addressing one of the above problems with the appropriate solution. Follow our steps below to get your Java commands via command prompt working again, and leave a comment in the comments section if you encounter any further issues (or know of a better solution).

Steps for finding registry keys for any version of Java 7

Follow format 7.0.xxx where xxx can be 100, 120, 130, 140 and so on. for example:

Type 7.0.100 in search field, finds registry key for Java7 update 10Type 7.0.120 in search field, finds registry key for Java7 update 12Type 7.0.180 in search field, finds registry key for Java7 update 18

Steps for finding registry keys for any version of Java 6

Follow format 6.0.xxx where xxx can be 100, 120, 130, 140 and so on. for example:

Type 6.0.100 in search field, finds registry key for Java6 update 10Type 6.0.120 in search field, finds registry key for Java6 update 12Type 6.0.180 in search field, finds registry key for Java6 update 18

Steps for finding registry keys for any version of Java 1.5

Follow format 1.5.0.xxx where xxx can be 100, 120, 130, 140 and so on. for example:

Type 1.5.0.100 in search field, finds registry key for jre1.5.0_01Type 1.5.0.120 in search field, finds registry key for jre1.5.0_12Type 1.5.0.180 in search field, finds registry key for jre1.5.0_18Steps for finding registry keys for any version of Java 1.4

Follow format 1.4.2_xxx where xxx can be 01, 12, 13, 14 and so on. for example:

Type 1.4.2_01 in search field, finds registry key for jre1.4.0_01Type 1.4.2_12 in search field, finds registry key for jre1.4.0_12Type 1.4.2_18 in search field, finds registry key for jre1.4.0_18

Reinstall Java and set system variable JAVA_HOME to your JRE (or JDK) path. Eg:   You can check if this was a successful solution with the following commands

Manually open command window to Java pathway.As a side note, you can also launch a command prompt directly from within the Java folder – navigate to your C:\Program Files\Java\bin folder (or wherever your Java is installed), hold Shift + Right click inside the window, and click “Open a command window here”.

Fix: The registry refers to a nonexistent Java Runtime EnvironmentFix: Could not Find the Recovery Environment on Windows 10[FIX] System Could not Find Environment Option that was EnteredUnable to Update the Minecraft Runtime Environment Error? Here’s how to fix Fix Error Could not find Java SE Runtime Environment - 99Fix Error Could not find Java SE Runtime Environment - 8Fix Error Could not find Java SE Runtime Environment - 15