My Oracle Support Banner

Java is no longer the default after older java version is uninstalled (Doc ID 2979085.1)

Last updated on OCTOBER 30, 2023

Applies to:

Java SE JDK and JRE - Version 8 to 8
Generic Windows


In case there are 8u371+ JRE/JDK  and 8u361 installed and then 8u361 is uninstalled the system is left in a state with no default JRE/JDK on the system. This affects registry keys (.jar file associations, current JRE in HKLM\Software\JavaSoft\Java Runtime Environment, and current JDK in HKLM\Software\JavaSoft\Java Development Kit registry subtrees), start menu shortcuts, Java Access Bridge functionality, and the default JRE (javapath). User's impact by messed up system configuration varies. The most critical is broken javapath as users lose the ability to launch java.exe without specifying the full path to the executable.

The below case (as an example of one of the possible scenarios) is fully reproduce the issue:

  1. JRE 8u361 and 8u351 (or below) installed
  2. Using msi installer, install JRE 8u381 with option RETAIN_ALL_VERSIONS=1
  3. Now 3 jre installed: 8u351, 8u361 and 8u381 (expected)
  4. Default is java 8u381 (expected)
  5. Uninstall 8u361
  6. Default java now is 8u351 (not expected, should be 8u381)


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.