Closed Bug 229627 Opened 21 years ago Closed 20 years ago

Installer creates wrong registry key, so Java 1.4.2 does not work

Categories

(Firefox :: Installer, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firebird0.8

People

(Reporter: avbohemen, Assigned: bugs)

References

()

Details

(Keywords: conversion)

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7a) Gecko/20031221 Firebird/0.7+ (Nova: MNG,DOMi)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7a) Gecko/20031227 Firebird/0.7+

On a completely blank Windows system with Sun Java 1.4.2 or higher already
installed, the Firebird installer creates the wrong registry key for Java to work.

about:plugins says the Java plugin is enabled, but sites with Java don't work.

Reproducible: Always

Steps to Reproduce:
1. Install Java 1.4.2 (or the latest 1.4.2_03) from Sun on a blank Windows machine
2. Install Firebird using the installer
3. Go to a site which uses java, like
http://java.sun.com/webapps/getjava/BrowserRedirect?locale=en&host=www.java.com:80

Actual Results:  
Sun's site offers to download java, as it finds it is not installed.

Expected Results:  
The site should say "Java software installed".

The installer creates the following registry key:

HKEY_Local_Machine\Software\mozilla.org\Mozilla Firebird
"CurrentVersion"="0.7+ (en)."

That key doesn't make Java recognise Firebird. The correct key should be (as
indicated by the .reg-file offered by
http://texturizer.net/firebird/faq.html#q2.2 ):

HKEY_Local_Machine\Software\mozilla.org\Mozilla

The value of CurrentVersion makes no difference, Java accepts that without any
problem.
WFM, using:

Java plugin: 
Version 1.4.2_03 (build 1.4.2_03-b02)

Firebird:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031228
Firebird/0.7+

downloaded from:

ftp://ftp.mozilla.org/pub/mozilla.org/firebird/nightly/latest-0.8/FirebirdSetup.exe 
6328 KB  	29/12/2003  	8:38:00 AM


Steps to WFM:

1. Test current java installation works (I use a hello world applet), check
about:plugins for java plugin.
2. Remove java via control panel->add remove programs, remove c:\Program Files\java.
3. Test java does now not work, and is not listed in plugins.
4. Remove Firebird, remove profile, delete registry keys which contain reference
to firebird.
5. Run the newly downloaded installer.
6. Verify that java is not installed.
7. Go to www.sun.com, follow links to java download page, download java.
8. Test hello world applet - works.  View about:plugins, shows java plugin
installed.

Anton, keep in mind that the registry key fix at texturizer.net is only for
people who don't use the installer (ie. the .zip version).  To get java working,
all you should need to do is follow my steps from above.

Post more comments if you make any more progress/still have problems.
I did everything you said, and it does *not* wfm, at least on three different
machines. Are you sure you deleted the entire HKLM\software\mozilla.org key
prior to installing Firebird? The key at Texturizer.net was found in the time
when there was no installer for Firebird. I can imagine people forgot to remove
this key when testing the installer and thus assuming everything works fine.

I specifically tested this for people who want to switch from IE to Firebird,
that already have Sun Java installed (ie. new HP EVO machines have that by
default). Fact is, the installer creates the wrong key (it should be named
"Mozilla" instead of "Mozilla Firebird" under mozilla.org) and Java does not
work, whether it was installed prior to, or after installing Firebird through
the installer.
Confirming (sorry Anton, I should have picked up on this earlier).

Steps for me to reproduce:

1. Started with a blank Windows XP machine that had never had mozilla, firebird
or java installed on it.  (ie. Java didn't even work in IE).
2. Created system restore point "pre java pre firebird".
3. Installed Firebird with the latest 0.8 branch installer (dated 31/12/2003).
4. Installed Java 1.4.2_03.
5. Found that Java did not work.

By changing the registry (as the .reg file on firebird help does):

From this:

HKEY_LOCAL_MACHINE\SOFTWARE\mozilla.org
                                        Mozilla Firebird
                                                        0.7+. (en)
To this:

HKEY_LOCAL_MACHINE\SOFTWARE\mozilla.org
                                        Mozilla Firebird
                                                        0.7+. (en)
                                        Mozilla

And giving the new Mozilla entry the key:

"CurrentVersion" with a value of "1.5"

Java works fine.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Nominating this as a 0.8 blocker because:

1. The installer was meant to fix Java install bugs once and for all, but it is
still failing for "new customers" who have never had mozilla/firebird installed.
2. It should be a very simple fix, and does not affect the firebird code itself.
3. I'm sick of seeing Java doesn't work bug reports :)
Flags: blocking0.8+
This is an ugly hack - it just does what the .reg file on the firebird plugin
help site does (adds a mozilla key to the registry).  However, I've tested it
and it does work.  I'm not sure this is the "right" solution, but it is no
worse that what is available currently.
Sorry, this is my first ever patch.... The patch changes
browser\installer\windows\browser.jst (not obvious from the patch file).
Ashley, do not set blocking+ flag. These are only to be used by the firebird
developers. You may nominate a bug for blocking-status by setting the blocking?
flag.
Flags: blocking0.8+ → blocking0.8?
Keywords: conversion
A much nicer patch - only creates the registry entry if one does not already
exist.
Attachment #138365 - Attachment is obsolete: true
Comment on attachment 139330 [details] [diff] [review]
missing registry entry patch version 2

requesting review of version 2 of this patch.
Attachment #139330 - Flags: review?(bugs)
Comment on attachment 139330 [details] [diff] [review]
missing registry entry patch version 2

r=ben@mozilla.org
Attachment #139330 - Flags: review?(bugs) → review+
targeting. 
Status: NEW → ASSIGNED
Target Milestone: --- → Firebird0.9
per ben on IRC
Flags: blocking0.9?
Flags: blocking0.8?
Flags: blocking0.8-
fixed branch and trunk
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Flags: blocking0.8- → blocking0.8?
Resolution: --- → FIXED
Flags: blocking0.8? → blocking0.8+
Flags: blocking0.9?
Target=0.8 for historical reasons because this was fixed on branch and trunk.
Target Milestone: Firebird0.9 → Firebird0.8
Why was subkey assigned twice?

-> +  subkey  = "SOFTWARE\\$CompanyName$\\Mozilla";
   +  szCurrentMozillaVersion = winreg.getValueString(subkey, "CurrentVersion");
   +  logComment("szCurrentMozillaVersion: " + szCurrentMozillaVersion);
   +
   +  if((szCurrentMozillaVersion == "") || (szCurrentMozillaVersion == null))
   +  {
   +    /* we *MUST* have a Mozilla CurrentVersion key for the Java plugin to
work with Firebird - bug 229627 */
-> +    subkey  = "SOFTWARE\\$CompanyName$\\Mozilla";

The second assignment can be removed.

Status: RESOLVED → VERIFIED
QA Contact: bugzilla → installer
You need to log in before you can comment on or make changes to this bug.