Install Oracle Java 7 Browser plugin
Update: in my test, the Oracle Java 7 browser plugin crashes Firefox and doesn't load in Chrome and it seems I'm not the only one, so it would be a good idea noy to upgrade the browser plugin too (JDK 7 seems works ok). If you want to try it out anyway, see the installation instructions below. There are also instructions on reverting the changes at the end of the post.
Even though the steps below are for Firefox, the plugin will also be updated in Chrome (possibly other browsers too) as it looks under ~/.mozilla/plugins folder for plugins too.
Firstly, remove old Java plugin links using the commands below:
rm -f ~/.mozilla/plugins/libnpjp2.so ~/.mozilla/plugins/libjavaplugin_oji.so
sudo rm -f /usr/lib/firefox/plugins/libnpjp2.so /usr/lib/firefox/plugins/libjavaplugin_oji.soAnd for the last step, let's create a simbolic link for the newly installed Java into the Mozilla plugins directory:
- 32bit:
ln -s /usr/lib/jvm/jdk1.7.0/lib/i386/libnpjp2.so ~/.mozilla/plugins/- 64bit:
ln -s /usr/lib/jvm/jdk1.7.0/lib/amd64/libnpjp2.so ~/.mozilla/plugins/Reverting the changes
Install Oracle JDK 6 from the Ubuntu repositories (make sure you enable the Partner repository under Ubuntu Software Center > Software Sources; alternatively, you can also use the LFFL Java PPA):
sudo apt-get install sun-java6-jdk sun-java6-pluginOr, you can instal OpenDJK:
sudo apt-get install openjdk-6-jdk icedtea-pluginNow run our script:
sudo update-javaAnd select the "java-6-sun-1.6.0.26" ("java-6-sun" works too) for Oracle JDK or the "java-1.6.0-openjdk" folder for OpenJDK.
For Oracle JDK, let's revert the browser plugin changes too:
rm -f ~/.mozilla/plugins/libnpjp2.so32bit:
sudo ln -s /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/i386/libnpjp2.so ~/.mozilla/plugins/64bit:
sudo ln -s /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/libnpjp2.so ~/.mozilla/plugins/