by BehindJava

How to resolve the Error opening registry key Java

Home » java » How to resolve the Error opening registry key Java

In this blog, we are going to learn about resolving the Error opening registry key ‘Software\JavaSoft\Java Runtime Environment.3’. There are 3 locations to check.

  1. Registry HKEYLOCALMACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.8.0_xxx\JavaHome.
  2. Java Control Panel- Java tab - View - Path
  3. Environment Variables - Path ($env:Path) All 3 have to align (if you have multiple entires just remove the wrong ones) - thats all

In case a virus scanner (like McAfee) is running, try:

  1. Disable virus scanner
  2. Uninstall Java (via Control Panel / Programs and Features)
  3. Reinstall Java (from
  4. Re-enable virus scanner

Javac was on 13 from jdk but java was using 1.8 from jre so java threw incompatible runtime error.

  1. Under Control Panel -> Programs: Uninstall 1.8 (named Java 8 runtime) and DID NOT touch the other one (named Java (TM) SE Development Kit 13).
  2. Deleted java.exe, javac.exe and javawc.exe files from:

    1. C:\Windows\system32
    2. C:\Windows\SysWOW64
    3. C:\ProgramData\Oracle\Java\javapath
  3. The environment variable JDKHOME was pointing to 13 but JAVAHOME was pointing to 1.8 so i pointed JAVA_HOME to also use 13 which was C:\Program Files\Java\jdk-13.0.1
  4. There was a Path variable under both User variables and system variables sections. For the one in user variables section, add the string %JDK_HOME% - which translated automatically to the physical path. For the one under system variables, I deleted the path C:\ProgramData\Oracle\Java\javapath and added C:\Program Files\Java\jdk-13.0.1\bin