Java FAQ
Windows
On Windows, Mozilla can be used with Sun's Java Runtime Environment (JRE). It can not be used with the Microsoft Java VM, as that can only be used with Internet Explorer. Also, versions of Sun's JRE older than 1.3.0_01 will not work. It is recommended that you use Java Runtime Environment 5.0 or later if possible.
It is possible to install JRE 5.0 Update 9 from within Mozilla, using XPInstall technology. This is by far the easiest way to install Java. If you can not use XPInstall, you can download the JRE 5.0 Update 5 full installer and use that instead.
On some systems, JRE 1.4.2 and later do not work. In this case, you can use JRE 1.4.1_07 until the issue you are having is resolved. Note that this release is no longer supported by Sun.
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.
Linux
On Linux, Mozilla requires JRE 1.4.2 or later.
Mozilla 1.4 and later, and Mozilla Firefox, are compiled with gcc 3.x. A gcc 3.x compatible version of the Java plugin must be used. JRE 1.4.2 and later contain a compatible plugin.
If you installed the Java Runtime Environment 5.0 Update 9, this plugin is /usr/java/jre1.5.0_09/plugin/i386/ns7/libjavaplugin_oji.so - and to install it for Mozilla (including Mozilla Firefox), do the following:
- Open a terminal
- Change to your Mozilla (or Mozilla Firefox) plugins directory
- Issue the following command: ln -s /usr/java/jre1.5.0_09/plugin/i386/ns7/libjavaplugin_oji.so ./libjavaplugin_oji.so
If you install your JRE in a different way (self extracting package, debian package, etc), libjavaplugin_oji.so will quite likely be in a different location. Do not just blindly use the command listed above!
In JRE 1.4.2, this file was in plugin/i386/ns610-gcc32
Always make a symbolic link, as shown above, instead of copying the plugin. If you copy the plugin, your browser will crash every time you open a page containing a Java applet. You have been warned!
If you are using an older Linux distribution, you may need to install the gcc3 support libraries, as the gcc 3.2 version of the Java plugin requires libgcc_s.so.1 to operate. You may be able to find packages using Google.
If you are using an old or unofficial build of Mozilla (1.4a or later) or Mozilla Firefox, you can check which compiler was used by entering about:buildconfig in the location bar and pressing enter. You will see a line such as "gcc version 3.3.2", which will show the compiler that was used. If gcc2.9x was used, you need to use the ns7-gcc29 or ns610 plugin, not the ns7 or ns610-gcc32 plugin.
MacOS X
To use JRE 1.4 and later with Mozilla for MacOS X, you need to use the Java Embedding Plugin for Mac OS X. This is now shipped with SeaMonkey, Firefox and Camino. You can update to a newer version of the Java Embedding Plugin if you wish, although you really should read the Java Embedding Plugin Readme before attempting to do this.
If you are using versions of the Java Embedding Plugin older than 0.9.2, you should update to the most recent version due to security issues.
Known Issues
- Do not use Java with a spoofed useragent, as this may cause crashes (Bug 83376 - a JRE issue).
- If you must spoof your useragent, make sure it is reset to the default before restarting your browser.
- Remove any Java plugin files from your Plugins directory when installing a new JRE release (if present).
- To speed the Java plugin up on Windows, use the Java Control Panel to disable the Java icon appearing in the system tray, and disable the Java console.