Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question
1  
Have you installed the ubuntu-restricted-extras package? –  Falmarri Oct 7 '10 at 4:05
    
what did you try to install the SDKs? –  echox Oct 7 '10 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:

Firefox:

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

Chrome:

  • create /opt/google/chrome/plugins
  • Link ln -s /opt/java/64/jreXXX/lib/amd64/libnpjp2.so /opt/google/chrome/plugins
share|improve this answer
    
Thanks. I'll give this a shot when I get home tonight. –  Eric Ryan Harrison Oct 8 '10 at 13:17

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.

share|improve this answer
    
Thanks. I'll give this a shot when I get home tonight along with the other suggestion from the other guy. –  Eric Ryan Harrison Oct 8 '10 at 13:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.