Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to run Linux Google Chrome with Java support?

share|improve this question
add comment

12 Answers

up vote 11 down vote accepted

Yes, add --enable-plugins to your chrome command. It's currently not considered stable, but it works for me.

Actually, it seems to just work without that. Have you tried it? You can find a test applet here. Presumably you'll need Sun's Java installed.

share|improve this answer
    
Works now with --enable-plugins switch. Thanks! –  jldupont Sep 22 '09 at 9:41
    
What is my chrome command? –  Eric Wilson Feb 19 '13 at 13:35
    
@EricWilson I don't know, but you can find out by doing "which chrome" in a terminal. –  Matthew Talbert Feb 19 '13 at 14:54
    
I type which chrome and get no response. –  Eric Wilson Feb 20 '13 at 18:19
1  
Sorry, it's "which google-chrome" –  Matthew Talbert Feb 22 '13 at 4:02
show 1 more comment

I did it!

Just link libnpjp2.so which is in <your-java-dir>/lib/i386 to /opt/google/chrome/plugins (you need to create this directory beforehand).

For me, here are the commands:

mkdir /opt/google/chrome/plugins
cd /opt/google/chrome/plugins
ln -s /usr/local/jre1.6.0_17/lib/i386/libnpjp2.so .

Restart Chrome and enjoy!

share|improve this answer
    
ln -s libnpjp2.so to plugin dir also works for firefox minefield. –  Alfred Jan 21 '10 at 2:31
    
This worked for me on Fedora 11 32-bit (but the plugin was in /usr/java/jre1.6.0_16/lib/i386/libnpjp2.so) –  AndrewR Feb 2 '10 at 2:34
    
This also works for me on Ubuntu 9.10 32-bit, but the plugin is at /usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/i386/libnpjp2.so –  virtuallinux May 23 '10 at 16:44
    
Thanks for the tip about creating the plugins directory. Creating the symlink right in the chrome directory didn't work for me, but creating it inside the plugins directory did the trick. Google Chrome 16 on Fedora 16 LXDE. –  Ricket Feb 6 '12 at 21:31
    
This worked for me as well using OpenSUSE 12.1. Again the plugin file was in a slightly different directory. /opt/java/64/jre1.6.0_31/lib/amd64/libnpjp2.so –  Dracs Mar 29 '12 at 3:57
show 7 more comments

NOTE: Since this came up top on a Google search on 'linux chrome java' I'll allow myself to update this slightly old post.

I'm running Ubuntu Lucid Lynx 10.04 with the Google Chrome 5.0.375.55 beta directly from Google's own repositories. For me, many of the above steps were unnecessary. Simply install the Sun Java distribution + plugin and restart Chrome. No need to link modules, etc. since Chrome will autodetect the plugin.

So, run

sudo apt-get install sun-java6-jre sun-java6-plugin 

and all should be fine :)

share|improve this answer
    
Thank you for the update. +1 –  Gnoupi Jun 2 '10 at 12:54
3  
hi this didnt work for me. i just installed lucid today and chrome today. –  Kim Stacks Jun 4 '10 at 14:56
    
This worked beautifully for me. Running Ubuntu Maverick Meerkat (10.10) on x86 with the XFCE Desktop Environment. Remember that Sun Java comes from the Partner Repository - in case you have to enable it. –  David May 6 '11 at 12:35
2  
It should be noted that for this to work, you must enable the "Canonical Partners" repository. –  John Aug 31 '11 at 17:08
9  
It has been removed from repository. –  ablmf Feb 8 '12 at 22:48
show 1 more comment

Running Lubuntu 12.04 Beta 2, with the default (i.e. unchanged) version of Chromium - to get the java plugin working, all I did was install the icedtea plugin package from the standard repos:

sudo apt-get install icedtea-plugin

Restarted Chromium, and Java works in my browser.

share|improve this answer
    
+1 I did not want to fallback to sun jdk. Works perfectly for Chromium. –  Ck- Jul 31 '12 at 17:44
    
Egads, how was a mere mortal supposed to have figured that out? –  Edward Falk Oct 11 '12 at 19:14
    
Good point Edward - I only knew the java plugin in Chrome was called "icedtea" because websites with java applets (ah, I remember those...) popup a message saying "the icedtea plugin is requesting permission to run" or something like that. –  fishwebby Oct 12 '12 at 20:34
    
This also works in Ubuntu 12.10 in Google Chrome. I installed v7 of the plugin and already had Java installed. –  Hemm May 30 '13 at 22:16
    
nice. for me apt-get install icedtea-7-plugin worked with openjdk-7 ...maybe for the openjdk you need this icedtea thing as its partner? ref: askubuntu.com/questions/155852/installing-chrome-java-plugin –  rogerdpack Jan 31 at 17:49
add comment

For me (Ubuntu - jaunty 9.04) all I had to do was:

  1. Install the java6 jre package

    sudo apt-get install sun-java6-jre sun-java6-plugin
    
  2. Install the Chromium browser

    2.1 By first adding the following to /etc/apt/sources.list:

    # Chromium 
    
    deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu jaunty main 
    

    2.2 Resynchronize the package index:

    sudo apt-get update
    

    2.3 Install the chromium browser and some other plugins

    apt-get install chromium-browser chromium-codecs-ffmpeg-extra chromium-codecs-ffmpeg-nonfree
    
  3. Finally create the symlink to libnpjp2.so:

    sudo ln -s /usr/lib/jvm/java-6-sun/jre/lib/i386/libnpjp2.so /usr/lib/chromium-browser/plugins
    
  4. Restart Chromium browser if needed.

share|improve this answer
    
For me too, installing sun-java6-plugin did the job. –  Victor Sorokin Jun 16 '11 at 10:00
    
This answer is for Chromium, not Google Chrome. –  Victor Bjelkholm Sep 10 '12 at 21:25
1  
Perhaps, but it solved my problem, so thanks. I didn't even need to restart Chromium; the windows I had open with Java in them just suddenly updated themselves when I made the symlink. –  Edward Falk Oct 11 '12 at 19:13
add comment

With Ubuntu 8.04 LTS 64-bit, Chome 64-bit v4.0.249.43 and Java 6 do the following:

sudo mkdir /opt/google/chrome/plugins
cd /opt/google/chrome/plugins
sudo ln -s /usr/lib/jvm/java-6-sun-1.6.0.17/jre/lib/amd64/libnpjp2.so .
share|improve this answer
add comment

On Fedora 16 (which uses the OpenJDK instead of Sun's release) I had to run...

ln -s /usr/lib64/IcedTeaPlugin.so /usr/lib64/chromium-browser/plugins/IcedTeaPlugin.so

...and then restart Chromium. You may also need to yum install icedtea-web if you don't have IcedTeaPlugin.so already.

share|improve this answer
add comment

After doing the steps below it works for me. I'm runing Debian Lenny 5.0.3 - 2.6.26-2-686.

Download Java - www.java.com

root@yourpc# mkdir /opt/java

Move the file to /opt/java

------(root@yourpc# mv /home/youruser/Download/jre-6u17-linux-i586.bin /opt/java)

root@yourpc# cd /opt/java
root@yourpc# chmod +x jre-6u17-linux-i586.bin
root@yourpc# ./jre-6u17-linux-i586.bin

youruser@yourpc$ cd /opt/java/jre1.6.0_17/bin
youruser@yourpc$ ControlPanel
  1. Select the Java Tab*
  2. Click View...
  3. Click Find...
  4. Click Next...
  5. Select /opt/java/jre1.6.0_17/
  6. Click Next...
  7. Click Finsh...
  8. deselect the others JREs
  9. Click OK...
  10. Click Apply...
  11. Click OK ...


root@yourpc# mkdir /opt/google/chrome/plugins
root@yourpc# cd /opt/google/chrome/plugins
root@yourpc# ln -s /opt/java/jre1.6.0_17/lib/i386/libnpjp2.so .
youruser@yourpc$ google-chrome --enable-plugins %U

http://java.com/en/download/help/testvm.xml

share|improve this answer
add comment

Followed Skeptic's directions, it works great for Ubuntu 8.10 (32-bit) and Chrome 5.0342.7 beta.

sudo mkdir /opt/google/chrome/plugins
cd /opt/google/chrome/plugins
sudo ln -s /usr/lib/jvm/java-6-sun-1.6.0.17/jre/lib/i386/libnpjp2.so .
share|improve this answer
add comment

it's enough for both Chrome and Firefox to link to $JRE_HOME/lib/i386/libnpjp2.so from your $HOME/.mozilla/plugins folder:

ln -sfv $JRE_HOME/lib/i386/libnpjp2.so $HOME/.mozilla/plugins/libnpjp2.so

Don't forget to uninstall existing java installations (through the package manager)

share|improve this answer
add comment

If you want this for openSUSE 12.1 with 64bit, locate the file libnpjp2.so in the Java distribution that you downloaded. Now you can point the browser(s) to it with:

update-alternatives --install /usr/lib64/browser-plugins/libnpjp2.so javaplugin ...path-to.../libnpjp2.so 1

Replace ...path-to.../libnpjp2.so with the correct path. For 32bit versions, use

update-alternatives --install /usr/lib/browser-plugins/libnpjp2.so javaplugin ...path-to.../libnpjp2.so 1

(i.e. /usr/lib instead of /usr/lib64). To verify, open chrome://plugins in your browser. It should display the new plugin without a restart (at least it did in Chromium 21.x)

share|improve this answer
add comment

Just in case anyone is using Oracle's Java platform as opposed to OpenJDK, you can move libnpjp2.so from your_JRE_location/lib/i386/libnpjp2.so to your FireFox/Chrome plugin directory, which is generally in ~/home/bob/.browser/plugins/. If you're interested in installing Oracle's Java, check out Javinstall.

share|improve this answer
add comment

protected by Troggy Jan 7 '11 at 5:04

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.