MozillaZine

Talk:Java

From MozillaZine Knowledge Base

Please don’t ask support questions or make feature requests here on the Knowledge Base pages (read why). Try the MozillaZine Forums instead. Thanks!

Contents

Java is not JavaScript!

Please read this article if you are unsure of the difference.

Java Plugin DLL

In windows it seems that Java doesn't always overwrite the plugin DLL that Firefox uses. Recently I installed 1.4.2_06 and no Java applets showed up at all. I tried installing 1.5.0 and got the same result. After a little looking around I found the file that wasn't being updated.

In the "Mozilla Firefox\plugins" directory there is a file call NPOJI610.DLL. This is the Java plugin DLL. By copying this file from the jre version you want running in Firefox into this plugins directory you effectively install that version of Java for Firefox. You still need to ensure that Java is enabled in the options for Firefox but after that it should work. Also, make sure Firefox is not running when you try to copy this file over, it won't let you overwrite/rename the old file while it is running. The DLL should be in the "bin" directory under the jre directory of the version of Java that you want installed.

Lol, nothing's ever straightforward! On my machine, there is no such DLL in my <install-folder>\plugins\ folder. Fx just "found" the correct DLL (for JRE1.5), which presumably is the one in the Java install folder. I'm using Win98. Which version were you using? --Mozcerize 05:20, 11 Mar 2005 (PST)
I had an old JRE, probably the earliest version of 1.4.2 and my Firefox refused to show any plugins after I updated to the newer version. It might be because I deleted the old folder, but when I updated Java after that it never overwrote the old DLL. I should try removing the DLL and see if that lets Firefox detect the proper plugin it needs, but there's still the problem that 1.5 isn't compatible with 1.4.2, some applets that will run on the latter won't run on 1.5. Unless Firefox detects this then I still need to swap which version is running depending on what I'm trying to run. --Tread
Having the same problem with Java 1.5 and FF1.0.3. Copied referenced dll over to plugins folder without success. Can't activate mozilla in java control panel. Get the message mozilla not installed correctly. Only thing left to try would be to reinstall FF.

Security alert

I believe this vulnerability has been public since January, so I don't think that we need to make such a prominant notice about it. I think it would be better to retitle this section, add an explanation of how to check what one's current version is, and then advise updating. Also, I don't think we should link directly to the update page, given that the whole of the next section is devoted to explaining how to update cleanly. --Mozcerize 15:11, 10 October 2005 (PDT)

I think it's a good idea to keep the security alert section (I just updated it in fact, before reading this!) See my comment below Alice Wyman 22:22, 10 January 2006 (UTC)

Update locations

Alice, what do you think about using the java.com site for updates? I scouted around but could only find the following page for manual updates: http://www.java.com/en/download/manual.jsp , which covers JRE 5.0 but not the 1.4.x ones. Still, I think it's a better link for the 5.0 update than the java.sun.com page, which is perhaps a little too confusing for many KB visitors what with all the terminology (NetBeans, J2EE, JDK, SDK). --Mozcerize 16:55, 10 January 2006 (UTC)

The "manual" download link that's in the Install section is a good one for most users who want the latest version (I read on the Sun Java forum that JRE 6.0 is due this Spring 2006). I didn't want to confuse people so I resisted the urge to add links to other versions in the Install section. The the http://java.sun.com/j2se/downloads/index.html link to multiple versions in the Security alert section is confusing, I agree, but my only other idea would be to include two links, one for 5.0 and another for 1.4.2. It might be a red herring because I suspect most users never turn off the Java "autoupdate" feature and get updates through the scheduler (on Windows, jusched.exe for JRE 1.4.2). To tell you the truth, I've never done a JRE "autoupdate" since I've turned off that feature in the Java Plugin control Panel Updates tab.. Whenever I see I need to update (for security reasons) I use the XPInstall process for my JRE 1.4.2_xx updates from within Mozilla Suite... I have an old link for 1.4.2 that I keep updating myself by altering the filename... currently, its http://java.sun.com/update/1.4.2/j2re-1_4_2_10-windows-i586.xpi (the XPI link for 5.0 is on plugindoc.mozdev.org/faqs/java) Alice Wyman 22:22, 10 January 2006 (UTC)
Ok, let's leave the links as they are. --Mozcerize 17:21, 11 January 2006 (UTC)
I kept both download links but moved them to the top of the article, plus added information about Windows users being able to update from within the "Java Control Panel", since I brought it up :) Alice Wyman 22:10, 11 January 2006 (UTC)


Unable to change browser settings. Please check that Mozilla is properly installed on your system and/or you have sufficient permissions to change system settings.

This warning message is reportedly normal when Mozilla Suite is not installed but it is a big source of confusion for Firefox users. I didn't see the point of instructing users to edit the registry to be rid of that error so I removed those instructions but I think that pointing out that the error is "normal" when only Firefox is installed is a very good idea. Alice Wyman 18:51, 30 January 2006 (UTC) Removed:

This can be solved by editing the Windows Registry but this should only be done by advanced users!!!
* go to "HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox"
* note the value of "CurrentVersion" (eg "1.5 (nl)")
* go to "HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox\1.5 (nl)" 
(adopt the version from the  previous step)
* export this key
* go to "HKEY_LOCAL_MACHINE\SOFTWARE\mozilla.org\Mozilla"
* note the value of "CurrentVersion" (eg "1.7.12")
* in the exported reg-file replace all occurences of 
"HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla  Firefox\1.5 (nl)" 
 with "HKEY_LOCAL_MACHINE\SOFTWARE\mozilla.org\Mozilla\1.7.12" 
(adjust the versions to  what you actually have)
* import this reg-file by doubleclicking it
note: the only values that are really needed in this tree are:
* "CurrentVersion" in "HKEY_LOCAL_MACHINE\SOFTWARE\mozilla.org\Mozilla" (eg "1.7.12")
* "Install Directory" in "HKEY_LOCAL_MACHINE\SOFTWARE\mozilla.org\Mozilla\1.7.12\Main" 
(eg "C:\Program  Files\Mozilla Firefox\")
I agree with Alice's decision. Discussion of this problem is a useful addition to the article, but the solution (which is actually a hack) feels a bit too technical. (I believe we have kept registry edits to a minimum so far on the KB.) That said, it's an interesting solution, and it would be good to leave it on this talk page! --Mozcerize 10:35, 31 January 2006 (UTC)

I added that the "Unable to change browser settings" message can be disregarded "if Java is otherwise working". I also added a related fix in cases where Java is not working, along with a .reg file link, to the end of the article under Missing plugin alert even though Java is installed . The .reg file link is from the PluginDoc Java Faqspage and contains the following: Alice Wyman 11:38, 31 January 2006 (UTC)

[HKEY_LOCAL_MACHINE\SOFTWARE\mozilla.org\Mozilla]
"CurrentVersion"="1.5"

If this reg file does not apply to Firefox, it should be said clearly. Now it's not clear whether the heading "Add missing registry entry" is a separate heading or a subheading of "For Mozilla Suite and Netscape...". And shouldn't the value be changed to whatever version is installed? Apparently this also needs extra info because 1.5.0.6 registers itself as 1.8.0.6. --American Finn 11:15, 7 September 2006 (UTC)

The reg file DOES apply to Firefox - see http://plugindoc.mozdev.org/faqs/java.html from which I quote: If you are using a zipped build of Mozilla or Mozilla Firefox, you may need to add this registry entry. Mozilla and Firefox should add it if it doesn't exist, but it doesn't always work for whatever reason. Some users report requiring it even if they have used the Mozilla Firefox installer, so try it first if you have problems with JRE 1.4.2 or later. The version number (which refers to Mozilla Suite, btw) is not important. Alice Wyman 13:01, 7 September 2006 (UTC)
Yes, you're right that it *says* that it applies to Firefox, but most FF users wouldn't have *found* it because the heading "For Mozilla Suite and Netscape: check Java Control Panel browser settings" made the heading "Add missing registry entry" look like a subheading. It would seem i wasn't the first or the only one to believe that the layout was correct and the words a typo. I tried to make it less confusing, but i don't know if my solution is good. --American Finn 13:18, 20 September 2006 (UTC)
I did another edit and moved the Java#Add missing registry entry section above the (renamed) Java#Mozilla Suite only: Check Java Control Panel browser settings section. That should help. Alice Wyman 14:35, 21 September 2006 (UTC)

no Duke

Note that the "Dancing Duke" animation is currently reported not to work on the above page, even though the applet does start and reports your Java version and Operating System

BTW, i already pointed this out in december 2004 http://forums.mozillazine.org/viewtopic.php?p=1009626#1009626 Does anyone here know if it's been a continuous, continual, or intermittent problem for so long? --American Finn 19:01, 20 September 2006 (UTC)

I just noticed it recently. (I removed "currently" and added another test page to the section.) Alice Wyman 14:21, 21 September 2006 (UTC)
As of today the Duke is dancing again :) Alice Wyman 12:22, 9 October 2006 (UTC)

and stuff missing?

BTW http://forums.mozillazine.org/viewtopic.php?p=1015533#1015533 has stuff that is still missing here. --American Finn 19:01, 20 September 2006 (UTC)

What's still missing? It is not necessary to uninstall old Java versions but it's recommended (either before or after updating Java) because of security issues. That's mentioned here and there is also a section telling Windows users to Remove outdated Java files from the browser plugins folder, which does cause problems for Firefox users who, based on bad advice or whatever, copied their Java plugins to the Firefox plugins folder in the past. Uninstalling Java first wouldn't help those users who manually copied over files since the Java uninstall wouldn't find them .
I update Java with the old version still installed , with Firefox running, by the way, using the XPInstall method. Later on I uninstall the older version. What IS missing from the article, which I've been meaning to add, is the appearance of old JRE entries in the Firefox extensions window, in some cases, if the XPInstall method is used to install Java... see the references I posted here, http://forums.mozillazine.org/viewtopic.php?t=464463 Alice Wyman 14:21, 21 September 2006 (UTC)
  • What's missing is a description for Macintosh.--AnotherGuest. 19:30, 27 June 2007 (UTC)

Needlessly complicated discussions?

This all is too complicated for me to follow. Is most of section 3 devoted to repair procedures for Windows, rather than installation and update? Is the procedure not this:

  • Install
  • Uninstall previous versions for security reasons ?

By the way, it's so complicated I added a sentence by mistake. It looks as if special procedures are necessary to get it installed correctly, but I guess not, so I removed it again.--AnotherGuest. 19:30, 27 June 2007 (UTC)

Yes, Section 3 is about installation, update and some Windows fixes to get Java working. Go ahead and make it less complicated then, maybe by removing some of the "repair" portions of Section 3 to the "Java-related issues" section, if you think it will help. Another option to consider is splitting off the "Java-related issues" section to a new article... but then it would make sense to do the same for the Windows Media Player and Flash articles, which also have lengthy "Issues" or "Troubleshooting" sections. <snip> Alice 20:30, 27 June 2007 (UTC)
I've been working on the Java article for the new Mozilla Firefox KB and got it down to a less-complicated version here, just including the Firefox portions for enabling, testing and installing or updating Java, with the "Java-related issues" split off to a separate page. Maybe one of us could do something similar with this article, except keeping it general enough to include Mozilla Suite/SeaMonkey? I only included install/update info for Windows and Mac OS X in the Mozilla.org version and just linked to PluginDoc for other operating systems but we could, of course, keep the Linux and Solaris Intel sections , assuming they're correct (I wouldn't know). Alice 20:29, 6 August 2007 (UTC)