JDK-7166327 : JRE uninstall does not recover jarfile reg entry on 64bit systems
  • Type: Bug
  • Status: Closed
  • Resolution: Fixed
  • Component: install
  • Sub-Component: install
  • Priority: P3
  • Affected Version: 6u32,7u4,7u5,8
  • OS: windows,windows_vista
  • CPU: x86
  • Submit Date: 2012-05-03
  • Updated Date: 2013-06-26
  • Resolved Date: 2012-06-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
7u40Fixed 8 b45Fixed
Related Reports
Relates :  
Relates :  
.jar files association does not work if 32 and 64 bit JREs were installed and then one of the JREs was uninstalled. JRE uninstall does not recover jarfile reg entry on 64bit systems.
Reg keys verification was added and 32v64Matrix tests show the following:
Install JRE 7u5 b05 32 bit + JRE 7u5 b05 64 bit, remove JRE 7u5 b05 32 bit
Keys not found:

 Expected => (Default) REG_SZ JNLP File EditFlags REG_BINARY 00000100
 Actual => 
 Expected => IsHostApp REG_SZ
 Actual => 
 Expected => IsHostApp REG_SZ
 Actual => 
 Expected => IsHostApp REG_SZ
 Actual => 
 Expected => IsHostApp REG_SZ
 Actual => 

Strange values:
 Looked for =>  Executable Jar File
 String searched .7.0_05"

EVALUATION 32-bit OS only supports 32-bit JRE. Bill suggested: if (32-bit OS) It must be 32-bit JRE, so write to HKLM/Software/Classes else //64-bit OS if (32-bit JRE) write to HKLM/software/syswow3264node/classes else //64-bit JRE write to HKLM/Software/Classes

EVALUATION Just found out this may be simpler to fix than we anticipated. Apparently we should not be touching HKCR anymore, and instead be editing HKLM/Software/Classes/.jar (for 64-bit) and HKLM/Software/Wow6432Node/Classes/.jar (for 32-bit). So the fix should be to do the above and then test out the scenarios and make sure they still work.

EVALUATION It's probably a good idea to create function that will fix/restore the .jar association, and things of that nature that are shared by 32/64. So it should work like this: ResolveJarAssociation(){ -Find the latest version of the JRE (32 or 64) and set the .jar association to that -If there is both a 32 and 64 of the latest version on the machine, set to the 64-bit } We can then remove the .jar file association code from RegCurrentVersion and UnregJRECurrentVersion(), and instead call this function at the end of an install and uninstall. We may want to eventually use this function to deal with what java.exe's go in what system directories, and stuff like that. See 7166597. This is out of the scope of this CR, but it should be kept in mind during development.

EVALUATION The fix will be in the installer.dll (install/make/installerdll) project uninstaller code in utils.cpp: UnregJRECurrentVersion().

EVALUATION This registry is shared by both 32-bit and 64-bit. To fix this, we'd need to make code changes to the uninstaller to recognize if there is a JRE of a different arch still remaining on the system. Currently 32-bit will only restore the association of other 32-bit JRE's, and 64-bit will only restore the association of 64-bit JRE's.