I'm having a really hard time getting the Java browser plugin to install in Ubuntu 10.04. I've tried searching all over the place, but everyone seems to recommend installing the packages that no longer exist in the Ubuntu repositories.

Several places suggested installing the OpenJDK, which I did. Still doesn't work.

If you can give me any help at all getting Java plugins to work in either Chrome or Firefox, I'd be most gracious.

  • 1
    Have you installed the ubuntu-restricted-extras package?
    – Falmarri
    Commented Oct 7, 2010 at 4:05
  • what did you try to install the SDKs?
    – echox
    Commented Oct 7, 2010 at 10:55

2 Answers 2


Usually ubuntu-restricted-extras should work for you, like phunehehe mentioned.

Since Ubuntu 10.4 the sun-java* packages have moved from the "Multiverse Repository" to the "Partner Repositories".

Add the partner repositories to your package sources and you should be able install sun-java6-jre and sun-java6-plugin.

See "Adding Canonical Partner Repositories" int the ubuntu wiki.

To install Java you will have to decide if you want the OpenJDK or the Sun/Oracle Version. Java by itself is platform independent, but sometimes developers write applications which have dependencies to com.sun.* packages. These packages are only available in the HotSpot VM, which is the virtual machine of the Sun/Oracle Java distribution. To be on the safe side, you should use the Sun/Oracle Java version.

32-bit is available as package from the partner repository, 64-bit not yet, as far as I know and must be installed by hand:

  • Download your Version (32-bit or 64-bit) from the Oracle Download Page.
  • Create a folder for the installation (e.g.: /opt/java/64)
  • Install the .bin file: sudo ./jre-6uxx-linux-x64.bin
  • Don't forget to tell your system about the new java version with sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/64/jreXXX/bin/java" 1 and sudo update-alternatives --set java /opt/java/64/jreXXX/bin/java

These are the steps to install a JRE on your system.

Now you have to install the plugin to the browser:


  • If it doesn't exist, create ~/.mozilla/plugins
  • Link the plugin: ln -s /opt/java/64/jreXXX/lib/amd64/libnpjp2.so ~/.mozilla/plugins/


  • create /opt/google/chrome/plugins
  • Link ln -s /opt/java/64/jreXXX/lib/amd64/libnpjp2.so /opt/google/chrome/plugins

Have you tried installing the package ubuntu-restricted-extras? It bundles together several proprietary packages that support MP3, Flash and Java etc., so if you feel OK with proprietary technology then installing it would be the easiest. If you just want Java then open up Synaptic and install Sun's (Oracle's) packages, including the browser plugin.

If that doesn't work then maybe my blog post will, basically it involves making symbolic links to the shared objects

If you are on a 32 bit operating system: ln -s /path/to/jre/lib/i386/libnpjp2.so /etc/mozilla/plugins/
If you have gone 64 bit already: ln -s /path/to/jre/lib/amd64/libnpjp2.so /etc/mozilla/plugins/ (be sure that you downloaded the correct JRE)

I have been having bad luck with OpenJDK stuff so it would be great to know if someone can make it work too.

  • Thanks. I'll give this a shot when I get home tonight along with the other suggestion from the other guy. Commented Oct 8, 2010 at 13:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .