Written by James McDonald

October 29, 2009

Note: This works on Ubuntu 10.10 also

This worked for me:

# you may need to install the sun/oracle java first
me@mybox:~$ sudo apt-get install sun-java6-jre

# if you have only just installed then locate won't work use find instead
me@mybox:~$ find /usr/lib/jvm -name libnpjp2*
/usr/lib/jvm/java-6-sun-1.6.0.24/jre/lib/i386/libnpjp2.so

# or use locate if the sun java has been around a while:
me@mybox:~$ locate libnpjp2
/usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/i386/libnpjp2.so

# symlink libnpjp2.so into the chromium plugins directory
# command is split over two lines for readability
sudo ln -sf /usr/lib/jvm/java-6-sun-1.6.0.24/jre/lib/i386/libnpjp2.so \
 /usr/lib/chromium-browser/plugins/

# remove the old style plugin because it didn't work
sudo rm -f /usr/lib/chromium-browser/plugins/libjavaplugin_oji.so 

Test using the default java test page
http://www.java.com/en/download/help/testvm.xml

You should see something like this:

6 Comments

  1. Julian

    Works great! Thank you very much :)!

    Reply
  2. Ilkka

    Finally something that really works. Thank You 🙂

    Reply
  3. telman

    thank you very very much !!!

    I have spent all day trying to achieve the same with Firefox Mozilla on Ubuntu to run JavaFX samples which require java update 23. Currently the only acceptable plugin for Mozilla is IcedTea wich is integrated with OpenJDK and it is failing on “Verifying Installation Tool ” across the http://www.java.com saying that the current Java version is 20 despite of I see 23 on java -version command result.

    I have tried to manipulte with the following but no success yet.
    update-alternatives –install “/usr/bin/java” “java” “/usr/lib/jvm/jdk1.6.0_23/bin/java” 1
    update-alternatives –set java /usr/lib/jvm/jdk1.6.0_23/bin/java

    Do you have a solution for the above mentioned state regarding to Mozilla Firefox?

    (Sorry for any English grammar)

    Best Regards,
    Telman

    Reply
  4. Jan

    So annoying, I have the same problem with non-working libjavaplugin_oji.so in Debian 6 / chromium-browser. Thanks for the tip, it solved my problem.

    Reply
  5. Phoinx

    Helped me too! Thanks!

    Reply
  6. sjruckle

    Outstanding! I’m new to Linux, and following internet instructions to fix a problem almost never works on the first try. Except this time. Thanks!

    Kubuntu 11.04
    Downloaded and unpacked jre-6u25-linux-x64.bin from Sun’s website into /usr/lib/jvm/jre1.6.0_25/ had to change the permissions using sudo.

    Reply

Leave a Reply to Jan Cancel reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…

Squarespace Image Export

To gain continued access to your Squarespace website images after cancelling your subscription you have several...

MySQL 8.x GRANT ALL STATEMENT

-- CREATE CREATE USER 'tgnrestoreuser'@'localhost' IDENTIFIED BY 'AppleSauceLoveBird2024'; GRANT ALL PRIVILEGES ON...

Exetel Opt-Out of CGNAT

If your port forwards and inbound and/or outbound site-to-site VPN's have failed when switching to Exetel due to their...