Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've been trying to install the Java plugin for Chrome for a couple hours now, and I figured it was time to ask people with more experience. I can't seem to get it working. My current Java version is the 64-bit OpenJDK 1.6.0_24. I tried installing the IcedTea plugin to no avail. I have Ubuntu 12.04 64-bit installed at the moment.

When I tried testing if java was enabled in Chrome, any website with a Java applet would not load (when I disabled the plugin, they loaded, but not the applet).

I followed the instructions from here: http://technonstop.com/install-java-plugin-ubuntu-linux

which said to create this script and run it:

JAVA_HOME=/usr/lib/jvm/jdk1.7.0
MOZILLA_HOME=~/.mozilla
mkdir $MOZILLA_HOME/plugins
ln -s $JAVA_HOME/jre/lib/i386/libnpjp2.so $MOZILLA_HOME/plugins

Note: You may need to change the value of JAVA_HOME so that it correctly points to your installation of the JDK. 64-bit users will need to change the final line to:

ln -s $JAVA_HOME/jre/lib/amd64/libnpjp2.so $MOZILLA_HOME/plugins

but this did not work as well.

I just test it in Firefox and it's working. Still nothing for Chrome

share|improve this question
2  
possible duplicate of How do I install Oracle Java JDK 7? –  Uri Herrera Jun 25 '12 at 18:34
    
I have had the same problem. This problem frequently occurs with chromium in 64-bit. The best way to get rid of it is to use firefox instead of it. –  Pranit Bauva Aug 18 '12 at 8:27
1  
No, absolutely not a duplicate. This one is about how to get the Java plugin for Chrome working, not about how to install Java. –  Peter Flynn Jun 2 at 22:13
add comment

6 Answers 6

Alternate install Java for Chrome, can also install icedtea:

 sudo apt-get install icedtea-7-plugin

Then link icedtea in to chromium plugin folder thusly

cd /usr/lib/chromium-browser/plugins

and link

sudo ln -s /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/IcedTeaPlugin.so 
share|improve this answer
    
Awesome.. thanks a lot !! –  Bhargav May 11 '13 at 20:17
4  
I don't have no /usr/lib/chromium-browser/plugins directory... nor can I seem to find the chrome plugins directory with locate chrome | grep plugins –  cerr Sep 23 '13 at 18:58
3  
@cerr, I did this and it worked: sudo mkdir -p /usr/lib/chromium-browser/plugins (plugin successfully installed) –  KajMagnus Oct 7 '13 at 6:38
1  
@kajMagnus Thanks, I did that but no info is coming up when I go to java.com/en/download/testjava.jsp - sorry, yes, now it worked! I just had to restart my browser! Thanks! –  cerr Oct 7 '13 at 16:12
1  
Substitute i386 for amd64 if you're using a 32-bit system –  Peter Flynn Jan 7 at 16:00
show 2 more comments

I have recently hit by the same bug. If you look in your ~/.xsession-errors file, you possibly see:

/build/buildd/icedtea-web-1.2/build/../plugin/icedteanp/IcedTeaNPPlugin.cc:2072: thread 0x7f08d1365470: Error: Invalid plugin function table.

The bug report is Plugin fails to load in Chrome. A proposed update was released for the icedtea-6-plugin package and confirmed to work. This should land in a few days for all users.

Meanwhile, you can use a different browser as others suggested, Firefox works here.

share|improve this answer
add comment

The best solution I found, (none of these suggestions worked for me), is as followings: First install Icedtead pluging by:

  • 1) sudo apt-get install icedtea-7-plugin

Then in your chrome browser go to:

  • 2) chrome-> Settings-> Show Advanced Settings-> Privacy then click on Content Settings -> Plug-ins then click on Disable Individual Plug-in
  • 3) Disable both "IceTea-Web Plugin" and "Java(TM)"
  • 4) Restart the browser.
  • 5) chrome-> Settings-> Show Advanced Settings-> Privacy then click on Content Settings -> Plug-ins then click on Disable Individual Plug-in
  • 6) Enable only "IceTea-Web Plugin"
  • 7) Enjoy !
share|improve this answer
1  
I tried this (installed openjdk-7 and icedtea-7) but there is neither icedtea nor java plugins showing in chrome. How do I force Chrome to see them? I also installed Oracle Java7 and softlinked its libnpjp2.so into /opt/google/chrome/plugins but it makes no difference: it doesn't show up or work. –  Peter Flynn Jun 2 at 22:22
2  
Doesn't even show up in chrome://plugins –  Ken Sharp Jun 13 at 1:32
add comment

I've been having the same problem. After digging around for a while, I found that Chrome is a 32 bit application that does not have support for 64 bit Java. (A related issue is explained by Oracle here.)

This means you would have to install a 32 bit version of Java (basically Java 6) on your system. I personally have given up on the venture, but this older question might be of some help.

share|improve this answer
add comment

In my case, Chromium was not starting the app, no messages, just a grey box appearing where the app would be, so it was doing something, but not enough. Which sounds similar to OP. Non-browser java apps had previously been running ok on my system.

An article somewhere suggested using which javac to determine installed status. This generated no terminal output. So I tried just calling javac, and got the list of installer packages for java. So I think I had some sort of limited install, no idea what or why.

Executed sudo apt-get install openjdk-7-jdk and then re-enabled the icedtea Chromium plugin (via Settings | Advanced Settings | Privacy | Content settings | Disable individual plugins) which I had disabled earlier while trying other things. There were no other Java plugins in the list.

Ta-dah! Java apps now working in Chrome. I can't remember how or whence I installed Java previously, but it was likely a 'least resistance' approach, so I suspect some others may also have the same system state.

share|improve this answer
add comment

Many answers are now dated. They did not work for my 14.04 Ubuntu install. For my instance of chrome is installed in /opt/google/chrome. So the plugin folder would have to be created in there.

Updated instructions can be found at https://www.java.com/en/download/help/enable_browser_ubuntu.xml

  1. Create a directory called plugins if you do not have it. Type: mkdir -p /opt/google/chrome/plugins

  2. Go to Google chrome plugins directory before you make the symbolic link. Type: cd /opt/google/chrome/plugins

  3. Create a symbolic link. Type: ln -s /usr/local/java/jre1.7.0/lib/amd64/libnpjp2.so

  4. Restart your browser and test Java

Update for Chrome 34+ users

Please see java plugin in Chromium. Basiclly IcedTea plugin no longer works with Chome ever since Google disabled the NPAPI interface by default.

Ultimately my solution will be to switch back to firefox.

share|improve this answer
add comment

protected by Community Jun 11 '13 at 15:34

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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