8 JDK Installation Troubleshooting

The topic provide tips for resolving issues while installing JDK.

System Error During Decompression

If you see the error message: system error during decompression, then there might not be enough space on the disk that contains the TEMP directory.

Characters That Are Not Part of the System Code Page

A 1722 error may occur if the installation directory is not part of the system locale's code page. To prevent this, ensure that the user and system locales are identical, and that the installation path contains only characters that are part of the system locale's code page. User and system locales can be set in the Regional Options or Regional Settings control panel.

The associated bug number is 4895647.

Cleanup the Registry After a Failed JDK Uninstall

Sometimes, attempts to uninstall JDK through the Windows Add/Remove program leave behind some Java entries in the registry that are not fully removed. These left behind registry entries can cause problems in installing a new version of Java. The following are the methods to cleanup registry entries:

  • Program Install and Uninstall troubleshooter (Recommended Method)
  • Manual Registry Edit

Program Install and Uninstall troubleshooter (Recommended Method)

Run the Program Install and Uninstall troubleshooter to repair the corrupted registry keys that prevent programs from being completely uninstalled, or blocks new installations and updates.

Manually edit the registry (Use this only if the Fix It utility does not work)

Incorrectly editing your registry may severely damage your system. You should back up any valued data from your computer before making changes to the registry.

To save the registry key before deleting, in the menu bar, select File and then Export. In case you deleted the wrong registry key, you can restore the registry from your saved backup file by selecting from the menu bar File and then Import .

To delete the registry key:

  1. Determine the correct Registry Key. See Finding the JDK Registry Key and UninstallString Value.

  2. Highlight the key, Right click and select Delete.

  3. Click Yes when prompted.

The JDK gets uninstalled.

Fixing Shim Situation when JDK 26 and JRE 8 are Installed

When you install JDK 26 and then install JRE 8, and then run the java -version command, 1.8.0 is displayed in the output instead of 26. This is because the javapath is placed before JDK 26 location in the user environment path.

This is a bug with the JRE 8 installer. To fix this shim situation, uninstall and reinstall JDK 26.