JDK-6533331 : Java Installer fails to update/register CurrentVersion and BrowserJavaVersion correctly
  • Type: Bug
  • Component: install
  • Sub-Component: install
  • Affected Version: 6,6u5
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2007-03-12
  • Updated: 2010-09-17
  • Resolved: 2008-02-11
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 Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7
6u10 b07Fixed 7Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
System specific details:
Windows XP SP2
Browser(s): IE 7.0.5730.11
Firefox: 2.0.0.2

Test version: Java(TM) SE Runtime Environment 6 
Windows Offline Installation, Multi Language

Tried to update from JRE 1.5.0_11 to JRE 6 using Windows Offline Installation from:
http://java.sun.com/javase/downloads/index.jsp

Installation completed successfully. Testvm applet from:
http://java.com/en/download/help/testvm.xml  
still displays older JRE 1.5.0_11 as installed and working in Firefox.

Running same applet in Internet Explorer 7 displays the correct version which means update is sucessful.

Mozilla Family is enabled as supported browser in Java Control panel. 

Output for About:plugins in Firefox (as attached) depicts traces of two different plug-ins including 1.5.0_11 and 1.6. Also attached is the install log. 

I am not able to reproduce this bug locally.

We have received few requests as incidents as well where users failed to run the latest version in Firefox in spite of installing the same.

Comments
EVALUATION Java Installer fails to update/register CurrentVersion and BrowserJavaVersion registries correctly during installation and uninstallation of JRE 6 update when there's an existing installation of 5uN on the system. Failure to update BrowserJavaVersion registry correctly is what causes the problem originally reported in this bug. NOTE: The original bug synopsis is not correct. We do NOT want to copy any plugin libraries to any place for Firefox. So I changed the bug synopsis to reflect the issue appropriately, and so that fix for both registries can be carried out all in one shot of webrev and putback (also to save extraneous paperwork). Here's explanation for root cause: - CurrentVersion issue root cause: Problem is because InstallDeployToolkit() fails to do CopyFile() safely. Consider case 5uX and 6uN are installed. During uninstallation of 6uN, ReregisterCurrentJRE() is called to re-establish all settings for 5uX, including its registries. InstallDeployToolkit() is also called on 5uX. As part of this activity, toolkit's libs are copied from <jre>/bin/ to either <system_dir>/ or <FF>/plugins/ (for IE and FF, respectively). Since 5uX doesn't have toolkit, the CopyFile() operation fails and so does the CanonicalizeJava2Registry() operation which restores 5uX registry settings. The fix I chose is to ensure the CopyFile() operation operating gracefully by ensuring that the file source (toolkit's libs) exists before carrying out the CopyFile(). This simple fix in RegInstall.cpp is safe as it doesn't change the installer code dramatically and yet it corrects the problem with CurrentVersion registry. - BrowserJavaVersion issue root cause: The problem with BrowserJavaVersion key is not a regression in our code, rather it is caused by changes in Mozilla's treatments for its registries which we depended on: 1) Latest FF's value for "Install Directory" key now contains no trailing '\' 2) Registry tree Firefox 3 beta has the name Minefield, while we are looking for tree name "Mozilla Firefox" 3) Registry tree for Firefox 3 beta (Minefield) has the structure for Mozilla browser's registry structure, and therefore, it's treated as Mozilla browser instead of Firefox by our code. This causes our installer code fails to locate the real Mozilla browser if it also exists on the system. During JRE installation and uninstallation, we depend on these registries to determine the existence of FF or Mozilla, and to register/unregister JRE with the browser. Setting BrowserJavaVersion is part of this process. With these Mozilla's registries messed up, so of course there goes our update for this registry key. Problem with BrowserJavaVersion affects all releases when latest FF and Minefield are used. However, please NEVER do any dll copying to workaround the problem. Webrev for fix is ready and we'll try to get it in to the earliest possible build of 6u5.
05-11-2007

EVALUATION Removed incorrect evaluation.
31-10-2007

EVALUATION I can not reproduce the issue with the following system. Windows XP SP2 Browser(s): IE 7.0.5730.11 Firefox: 2.0.0.2 The correct jre version was displayed when I updated jre from 1.5.0_11 to 1.6.0. Please provide the system that the issue can be reproduced.
12-03-2007

WORK AROUND Modify Firefox Plug-in folder manually (step by step instructions): a) Delete previous Java plugin dll file NPOJI610.dll from Firefox plugins folder. Possible location could be: C:\Program Files\mozilla.org\Mozilla\plugins\npoji610.dll or C:\Program Files\Mozilla Firefox 2 Beta 1\plugins *Note: *Firefox directory may vary depending upon latest installed version b) and replace same with npoji610.dll from bin directory at: C:\Program Files\Java\jdk1.6.0\jre\bin
12-03-2007