Sunday, March 13, 2011

How to run Java applets in Google Chrome under Ubuntu


I found that Google Chrome doesn't auto-detect Java applets in Linux. Following commands will link the Java applet plugin to Chrome. Enter these in Terminal. Make sure you put the correct path for the JRE in /usr/lib/jvm/<jdk1.6.0_22>/jre/lib/i386/libnpjp2.so.

sudo mkdir /opt/google/chrome/plugins
cd /opt/google/chrome/plugins
Now, link the plugin  libnpjp2 to /opt/google/chrome/plugins directory by running the following. Double check whether the JRE path is correct.
sudo ln -s /usr/lib/jvm/jdk1.6.0_22/jre/lib/i386/libnpjp2.so

Like to know whether this solution works in other Linux distros as well. Let us know in the comments.

6 comments:

  1. Finally I solve my google chrome browser problem.
    Now I can run java applet on my chrome browser. This write up is in depth and informative.

    ReplyDelete
  2. Doesn't work with Redhat 2.6.32-71.el6.x86_64 and jre1.6.0_31.

    ReplyDelete
  3. i don't find libnpjp2 in this path (using java-6-open-jdk)

    ReplyDelete
  4. Yes. This works with Linux-mint 14 for java 64 version as well. Then the i386 folder should be replaced by amd64.

    ReplyDelete