Wednesday, January 14, 2009

Enable Java applets for Firefox on Linux

I assume that you use the default Firefox and apt-get setup.

1. Test if your browser supports Java applets here:

Java tester

2. If your browser "can NOT run Java applets", then install the Java runtime environment:

sudo apt-get install sun-java6-jre

3. Create the plugins directory:

mkdir -p ~/.mozilla/plugins

4. Link the plugin from the JRE installation to the plugins directory:

ln -sf /usr/lib/jvm/java-6-sun/jre/plugin/i386/ns7/libjavaplugin_oji.so ~/.mozilla/plugins

If your JRE got installed somewhere else, then look up the libjavaplugin_oji.so and link that file.

5. Add to ~/.bashrc:

MOZ_PLUGIN_PATH=$HOME/.mozilla/plugins
export MOZ_PLUGIN_PATH

If your default shell is not bash, then set this variable accordingly, in the startup script of that shell.

6. Log out and back, and start Firefox. Check if the installation is correct using the link at the top.

No comments: