This is the simplest approach I have found for using the Oracle Java Plugin for Firefox in Ubuntu, rather than the OpenJDK IcedTea plugin, which has given me nothing but problems (inconsistently running applets, refusing to update applets, no sound, full browser lock-up, etc).
Background: Ubuntu ships with OpenJDK/IcedTea, and no longer includes any Sun/Oracle JDK/JRE. There are many articles on entirely replacing OpenJDK with Oracle’s software, but none are very pretty (manual hacks to trick Ubuntu into accepting Oracle Java, using external repositories, etc.). The following approach does not remove the OpenJDK from your system. It simply circumvents the IcedTea plugin in Firefox, and only for the current user (not the entire system). This allows Ubuntu to remain happy, and your Firefox instance to use a manually installed Java Plugin (which will not be updated via Ubuntu software updates).
Notice: This works for me with Java 6 (I have not yet tried Java 7 OpenJDK/IcedTea applet behavior), but use at your own risk.
- Install Java (I will refer to the root installation path as )
- Disable the IcedTea plugin in Firefox & exit Firefox
- Make this directory:
[b]~/.mozilla/plugins/[/b]
- Create symbolic link (i386 path depends on your platform):
[b]ln -s <java>/jre/lib/i386/libnpjp2.so ~/.mozilla/plugins/[/b]
- Restart Firefox, check that the Java Plug-In is installed & enjoy functional applets
I hope this is useful to others - now I can finally play the Showcase and Java4k applet games!