Debian and Ubuntu: Enable Java in Google Chrome

13
by on August 26, 2012 at 4:03 pm

Debian Chrome Linux Logo

I’m writing this article for primarily for Debian Squeeze users, but it should also apply for Ubuntu 12.04 LTS and other releases as well, as the steps will be pretty much the same.

After you have downloaded and installed Google Chrome, you’ll most likely want to get Java working as well.  Follow this article, and you’ll be up and running in no time.

Getting Java

If you already have Java on your machine, feel free to skip this step.

Fire up Google Chrome and point it towards:  http://www.java.com/en/download/testjava.jsp

This should give you a missing plugin bar at the top; clicking install missing plugin will open a new tab with a download from Java’s website.  Select the appropriate download:  In our case either “Linux” for 32 bit, or “Linux x64″ for 64 bit.  The other downloads with RPM are generally for Red Hat and Fedora related distros.

The JRE or Java Runtime Environment, will be downloaded as a .tar.gz.  While the instructs suggest installing java to /usr/java, I prefer an alternate location for self-installed applications: /usr/local/bin

So copy the file you just downloaded to that location.  Untar/gzip it with the following command:

tar zxfv <file name>

That’s it for installing Java.  Keep in mind, that this JRE won’t be automatically updated because it hasn’t been installed via the package manager.  If you need to install another version of java, you can do so right along side this directory as well.

Enabling Java Plugin in Google Chrome

Now, to get the Java plug in working in Google Chrome.  If you followed the steps to install Google Chrome, then it will be installed to /opt/google/chrome/

Navigate to that directory and, if not already present, create the directory called ‘plugins’

mkdir /opt/google/chrome/plugins

cd to that new directory, and run the following (this creates a soft link to the plug-in provided by Java.  This plugin is the same one used in Firefox as well):

ln -s /usr/local/bin/jre<version>/lib/i386/libnpjp.so

if your java installation directory is different, be sure to make the appropriate change to the path above.

Java should now be working in Chrome!

Fun fact:  I created the image used in this article on a Debian Squeeze desktop with Inkscape, the GIMP, and uploaded the file with Google Chrome :)

, ,

You can skip to the end and leave a response. Pinging is currently not allowed.

  • Pingback: Debian Squeeze: Installing Google Chrome()

  • http://alinuxblog.com/fedora/how-to-install-google-chrome-with-repository-on-centos-fedora-red-hat-linux.htm install google chrome fedora

    I’m not sure the place you are getting your info, however great topic. I must spend a while studying much more or understanding more. Thank you for wonderful info I used to be in search of this information for my mission.

  • lm

    Tanks!!

  • Dave

    I’ve always fought this. Thank you for nice, quick walk-through.

    Nice work.

    • http://www.zipref.com Mike

      Glad I could help!

  • Nilton

    Very good! ;)

  • janpenguin

    Thanks a lot.
    It works perfect for Chrome 30.0.1599.114 in Debian Wheezy.

  • Andrew I

    I don’t have the libnpjp.so file, but was able to get the given solution to work by creating a symbolic link to my IcedTeaPlugin.so file instead. Thanks!

    • http://www.zipref.com Mike

      Thank you for sharing the tip!

  • Zhong

    Is this the only way to install the java plugin? Chrome banned third party plugins (such as iced tea) and sun java plugin isn’t in wheezy.

    • http://www.zipref.com Mike

      I’m sure this is not the only way to install a Java plugin. I’m unsure what Chrome’s policies may be.

  • http://rsaxvc.net rsaxvc

    debian, not debain

    • http://www.zipref.com Mike

      Great catch, thank you! I have fixed it.

Categories