After installing Fedora Core 6 I went after the usual customizations I need to make the most of my internet browsing experience. One of the site I frequent requires the use of a web browser Java plugin to access an online feature.
I don’t program in Java so all I really need is a Java plugin for Mozilla. Fedora Core 6 ships with an open source Java plugin for Mozilla whcch is disabled by default.
Being as practical and supportive of “open” options whenever possible I gave it a shot.
Section 14.3 of the Fedora Core 6 Release Notes contains:
14.3. Handling Java Applets
This release of Fedora Core includes a preview release of gcjwebplugin, a Firefox plugin for Java applets. gcjwebplugin is not enabled by default. Although the security implementation in GNU Classpath is being actively developed, it is not mature enough to run untrusted applets safely. That said, the AWT and Swing implementations in GNU Classpath are now sufficiently mature that they can run many applets deployed on the web. Adventurous users who want to try gcjwebplugin can read /usr/share/doc/libgcj-4.1.1/README.libgcjwebplugin.so, as installed by the gcc rpm. The README explains how to enable the plugin and the risks associated with doing so.
After closely reading /usr/share/doc/libgcj-4.1.1/README.libgcjwebplugin.so a section stuck out in all caps:
CURRENTLY GCJWEBPLUGIN RUNS WITH NO SECURITY MANAGER. THIS MEANS THAT
APPLETS CAN DO ANYTHING A JAVA APPLICATION THAT YOU DOWNLOAD AND RUN
COULD DO. BE *VERY* CAREFUL WHICH APPLETS YOU RUN. DO NOT USE
GCJWEBPLUGIN ON YOUR SYSTEM IF YOUR SYSTEM STORES IMPORTANT DATA.
THIS DATA CAN BE DESTROYED OR STOLEN.
I went ahead and made the plugin active by issuing, as root, ln -s /usr/lib/gcj-4.1.1/libgcjwebplugin.so ~/.mozilla/plugins/ and restarted the browser.
I visited the website I frequent to give this Java plugin a spin. It worked…sort of. It managed to load but most of the text associated with the applet was missing and some of the functionality of the applet failed. I can see where this applet will be very convenient in the near future since the opening up of Sun’s Java. But for now it was back to using the Sun Java plugin for Mozilla.
In the Fedora Core 4 Release Notes we find:
Fedora Core 4 users are advised not to use the Java RPM provided by Sun. It contains Provides that conflict with names used in packages provided as part of Fedora Core 4. Because of this, Sun Java might disappear from an installed system during package upgrade operations.
Fedora Core 4 users should use either the RPM from jpackage.org or manually install the Sun Java tarball into /opt. Sun Java 1.5+ is recommended for stability purposes.
This passage is missing in Fedora Core 5 and 6 Release Notes. So I am unsure if this caveat still applies. To be on the safe side I’ll install Sun’s Java in /opt.
Visit Sun Java Downloads and select the latest JRE, which at the time of this post was Java Runtime Environment (JRE) 5.0 Update 10.
I downloaded the Linux self-extracting version (jre-1_5_0_10-linux-i586.bin) and moved it to /opt. I then performed a chmod +x jre-1_5_0_10-linux-i586.bin and ran the file like so: ./jre-1_5_0_10-linux-i586.bin.
After agreeing to the information presented by typing yes the JRE was extrated into the /opt directory. All that was left to do was make the symbolic link as such:
ln -s /opt/jre1.5.0_10/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins
and restart the browser. All is now good on the Java Browser Plugin front. You can test the browser plugin by visiting Sun’s Verification Page.
NOTE: This method is only to allow use of the Sun Java Browser Plugin. It is not intended to change the default Java environment in Fedora Core 6 as the only Java application I use (Azureus) works flawlessly out of the box on Fedora Core 6.
Hopefully with Sun releasing Java under the GPL we won’t need to do this in future releases.