I'm trying to manually install the Java plugin for Firefox 4 on Mac OS X v10.9 (Mavericks) (I got Firefox 4 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 .


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

but I still get the "missing plugin" warning in Firefox. It 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.

  • 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?
    – BZ1
    Jun 21, 2011 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, 2011 at 14:44
  • is $JAVA_HOME set? (does echo $JAVA_HOME give a path to the JRE path?)
    – Lekensteyn
    Jul 22, 2011 at 7:09
  • yup, JAVA_HOME is set and points to /usr/local/java which is a symlink to the jdk.
    – agnul
    Jul 22, 2011 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.

  • +1 Great! This worked like a charm for me on firefox 6.
    – Jamess
    Sep 9, 2011 at 11:30

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

Easy Linux Tips: Install Java

  • 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, 2011 at 7:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .