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

Uninstall / Install gives incorrect version number in the registry

XMLWordPrintable

    • x86
    • windows_xp

      FULL PRODUCT VERSION :
      Easier said than done - redirecting the output to a file doesn't work (presumably another bug).
      java version "1.7.0_75
      Java SE Runtime Environment (build 1.7.0_75-B13)
      Java Hotspot Client VM (build 24.75-b04, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Windows XP SP3

      A DESCRIPTION OF THE PROBLEM :
      Summary.

      There is a bug in the installer(s): if you uninstall V8 and install V7, the 'CurrentVersion' isn't set correctly, with the result that the registry points to a non-existent folder.

      Details.

      I was having trouble running some Java programs (not my own) in Windows XP, and in the process I uninstalled and installed Java versions 6, 7, and 8, one at a time, probably in the order 7, 8, 7, 6, 7. The program that had the original problem only worked in V6, but some other programs stopped working. I went back to V7, and those other programs still didn't work. The message was "the registry refers to a nonexistent java runtime environment installation". The only advice I could find with Web searches was to reinstall Java. Needless to say, that didn't work.
      So I looked at the registry, and I found that there were still references to V8, which had been uninstalled. The first was
      HKEY_CLASSES_ROOT\jarfile\shell\open\command - (Default) = "C:\Program Files\Java\jre1.8.0_31\bin\javaw.exe" -jar "%1" %*
      The folder re1.8.0_31 doesn't exist, so I changed it to jre7. That didn't work.
      Then I found
      HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment - CurrentVersion = 1.8
      I changed this to 1.7, and deleted some following entries such as
      HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.8 - JavaHome = C:\Program Files\Java\jre1.8.0_31
      retaining entries such as
      HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.7 - JavaHome = C:\Program Files\Java\jre7
      That worked.



      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      the registry refers to a nonexistent java runtime environment installation

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      Anything.
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Manually edit the registry, as described above.

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: