Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8196481

Uninstalling Java 8u161 removes JavaSoft registry key

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_10

      Description

      FULL PRODUCT VERSION :
      java version "1.8.0_161"
      Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
      Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 10.0.14393]

      A DESCRIPTION OF THE PROBLEM :
      When uninstalling Java 8u161 (tested both 32 bits and 64 bits) and it is the last installed JRE on the system, it removes the HKLM/Software/JavaSoft and HKCU/Software/JavaSoft registry keys and their children.

      Older JREs (I tested 8u66 and 8u151) did not remove these keys upon uninstall.

      This behavior is only seen if there are no other JREs installed upon completion of the uninstall. So if u151 was not uninstalled at the installation of u161, uninstalling u161 does not cause any problem.

      This can be a huge pain, because the java.util.prefs.Preferences class saves into the Prefs sub-key in the registry. It is also customary for many users to fully uninstall older instances of a software before installing the new one. Thus, this behavior causes loss of preferences for all java applications even when using other JDK releases not installed by Oracle.

      REGRESSION. Last worked in version 8u151

      ADDITIONAL REGRESSION INFORMATION:
      (Untested on 152)
      Tested on 151 and 66 when uninstalling:

      java version "1.8.0_151"
      Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
      Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)

      java version "1.8.0_66"
      Java(TM) SE Runtime Environment (build 1.8.0_66-b18)
      Java HotSpot(TM) 64-Bit Server VM (build 25.66-b18, mixed mode)

      These versions do not remove the registry keys, even when they are the last JRE installed

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Uninstall all JREs / JDKs
      Install Java 8u161
      Uninstall Java 8u161

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      HKCU/Software/JavaSoft should not be missing in the registry, and all children should be intact
      ACTUAL -
      HKCU/Software/JavaSoft and all children are missing from the registry

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      Keeping an older JRE installed when installing Java 8u161, means that uninstalling 8u161 will keep the registry keys intact.

        Attachments

          Activity

            People

            Assignee:
            pardesha Pardeep Sharma
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: