Java will not run in Chromium, Google Chrome and Firefox

cd /usr/lib/chromium-browser/plugins
sudo ln -s /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/i386/libnpjp2.so libnpjp2.so

Restart chromium-browser.

Or if you have the latest 64-bit version (installed in /usr/lib/jvm/jre1.7.0/) use this as the second command:

sudo ln -s /usr/lib/jvm/jre1.7.0/lib/amd64/libnpjp2.so libnpjp2.so

sudo apt-get install icedtea-plugin

This worked for me in Kubuntu 11.10 to get JAVA working on the computer; however, it still does not get JAVA to work in Chrome or Firefox.


sudo apt-get install openjre-6-jre icedtea6-plugin

should be enough to pass the Java test here: http://java.com/en/download/testjava.jsp in Chromium. Firefox is a different issue.

However, I am still stuck on some other issues. openjdk-7-jre would be preferred, but there is no icedtea7 yet in Oneiric universe. So on the JDK side, when I use

sudo update-java-alternatives -s java-1.7.0-openjdk-amd64

I will get the error

"update-alternatives: error: no alternatives for -javaplugin.so."


The best solution I found, (none of these suggestions worked for me), is as followings: First install Icedtead pluging by:

  • 1) sudo apt-get install icedtea-7-plugin

Then in your chrome browser go to:

  • 2) chrome-> Settings-> Show Advanced Settings-> Privacy then click on Content Settings -> Plug-ins then click on Disable Individual Plug-in
  • 3) Disable both "IceTea-Web Plugin" and "Java(TM)"
  • 4) Restart the browser.
  • 5) chrome-> Settings-> Show Advanced Settings-> Privacy then click on Content Settings -> Plug-ins then click on Disable Individual Plug-in
  • 6) Enable only "IceTea-Web Plugin"
  • 7) Enjoy !

I had the same problem with the Java plugin not working in Chromium or Firefox. I use the Oracle JDK's for Java 6 and 7.

Oddly enough, after playing around and not finding any solution that worked, I disabled the plugin in Chromium, and the re-enabled it again - and the Java plugin works, in both Chromium AND Firefox.

I did end up with Chromium not shutting down properly, but after shutting down these processes, it started normally, and the Java plugin still worked. Weird or what?