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'm trying to manually install the java plugin for Firefox4 on maverick (got ff4 from the PPA), but it seems the usual instructions don't work. I've tried doing both

cd ~/.mozilla/plugins 
ln -s $JAVA_HOME/jre/lib/i386/libnpjp2.so .

and

cd /usr/lib/firefox
ln -s $JAVA_HOME/jre/lib/i386/libnpjp2.so .

but I still get the "missing plugin" warning in Firefox. Used to work fine for firefox 3.6. Also, after doing the first above chromium is able to pick up the java plugin without problems. In case it makes any difference I'm running Oracle's "vanilla" JDK, not the Ubuntu sun-java-6-bin package.

share|improve this question
    
Are you using 32-bit Ubuntu or 64-bit version? Is the JAVA_HOME environment variable set to the actual location of the Java installation? –  Subhash Jun 21 '11 at 4:23
    
32bit ubuntu, JAVA_HOME set and pointing to the JDK install directory, I've even fixed the alternatives system. –  agnul Jun 22 '11 at 14:44
    
is $JAVA_HOME set? (does echo $JAVA_HOME give a path to the JRE path?) –  Lekensteyn Jul 22 '11 at 7:09
    
yup, JAVA_HOME is set and points to /usr/local/java which is a symlink to the jdk. –  agnul Jul 22 '11 at 12:21

2 Answers 2

If you run the Oracle Java standalone installer (.bin file), it will just extract the java directory from the archive. It will not create the environment variable JAVA_HOME. It is best if you extract the java archive to a folder such as /usr/java.

Next, find the folder where Firefox is installed. It will have a directory named plugins there. In this directory, create a soft link to the file libnpjp2.so.

On my computer, I did with these commands. It will be different in yours.

cd /usr/lib/firefox-3.6.3/plugins
sudo ln -s /usr/java/jre1.6.0_20/lib/i386/libnpjp2.so  .

After doing this, you can type about:plugins in Firefox to check the plugin availability in the browser.

share|improve this answer
    
+1 Great! This worked like a charm for me on firefox 6. –  Jamess Sep 9 '11 at 11:30
    
+1. This worked as stated for Ubuntu 14.04 Desktop 64-bit, Firefox 31 (64-bit) and Java version 7 update 65 (64-bit) (all three from spring/summer 2014) - except for Java delivered as a .tar.gz file (and extracted accordingly) and different paths, /usr/lib/firefox/browser/plugins and /usr/java/jre1.7.0_65/lib/amd64/libnpjp2.so, respectively. I tested it by opening the Java applet at http://www.falstad.com/dfilter (a digital filter simulation). –  Peter Mortensen Jul 25 at 23:55
    
(Folder /usr/java as per java.com/en/download/help/linux_x64_install.xml.) –  Peter Mortensen Jul 26 at 2:09

You can refer to this website to get the latest version of Java and the Java plugin working:

Easy Linux Tips: Install Java

share|improve this answer
1  
Instructions on that page boil down to the usual "create a symlink somewhere in your home". Still doesn't work on firefox4. –  agnul Jun 15 '11 at 7:57

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.