## 42.3 Mozilla Java Plugin

{#sec:java-plugin}

Currently it is not possible to use a free Java Virtual Machine as a Mozilla plugin because most of the free JVMs do not yet support the Java AWT (Java GUIs). So the non-free alternatives from Sun, IBM, or Blackdown are required. This is unfortunate as it means that your system becomes dependent on software that you are unable to validate and view yourself, relying on very few others to provide trustworthy code.

An installation of Java using java-package, java-package, java-package will setup the appropriate plugins for Mozilla.

To manually link in a Java plugin running with an installation of, for example, j2sdk1.4.2_03 (from Sun and installed as /usr/local/j2sdk1.4.2_03 as described in Section 42.1) for Mozilla 1.5, link the appropriate library to the mozilla plugin directory:

  # cd /usr/lib/mozilla/plugins
# ln -s /usr/local/j2sdk1.4.2_03/jre/plugin/i386/ns610-gcc32/libjavaplugin_oji.so

Then run Mozilla and visit about:plugins to ensure the plug in is found.

For firefox the procedure is the same except the link goes into /usr/lib/mozilla-firefox/plugins.

### 42.3.1 Old Recipes

An older recipe for installing a Java plugin for the then new version of Mozilla (e.g., 2:1.3.1-3) which was compiled with gcc 3.3 was: {

$mkdir j2sdk-1.4.1-01-linux-i586-gcc3.2$ cd j2sdk-1.4.1-01-linux-i586-gcc3.2
$wget ftp://ftp.easynet.be/blackdown/JDK-1.4.1/i386/01/j2sdk-1.4.1-01-linux-i586-gcc3.2.bin$ wget http://twolife.free.fr/debian/j2se1.4-i586_1.4.1.0.1-4.diff
$patch -p1 -i j2se1.4-i586_1.4.1.0.1-4.diff$ debuild -uc -us
$cd ../$ wajig install j2re1.4_1.4.1.0.1-4_i386.deb

}

Then visit the URL about:plugins to ensure it is recognised.

Another approach was to leave it to Mozilla to download a Java Plug-in:

        As root start up Mozilla.
Visit a java page (http://datamining.csiro.au/ssh)
Auto install the plug in.
As root: cd /usr/lib/mozilla/plugins
As user browse to "about:plugins". 
  <download jre.xpi>
# unzip jre.xpi -d $MOZILLA_FIVE_HOME/plugins 'jre-image-i386/*' # cd$MOZILLA_FIVE_HOME/plugins
# ln -s jre-image-i386/plugin/i386/ns600/libjavaplugin_oji.so .