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.

This question already has an answer here:

I am trying to install Java and plugins for Firefox. I installed both the JDK and JRE.

When I try with the sudo update-alternatives --config java command it shows only one choice available.

Plugins are not usable in Firefox. I don't know how to uninstall and reinstall it.

share|improve this question

marked as duplicate by minerz029, Aditya, BuZZ-dEE, Avinash Raj, Jorge Castro Feb 14 '14 at 15:30

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

since you do not have a previous installation of java only one choice is shown. –  M.Tarun Oct 6 '13 at 12:00
To me it is not clear what your problem is. Is java functioning properly? Can you compile and run java programmes? –  Luís de Sousa Oct 6 '13 at 14:20
As far as I understand you have installed jdk, jre and the browser plugins (icedtea). But you can't use the plugins, can you explain further what the problem is? Are you getting an error? Btw, you can uninstall (Remove) and re-install IcedTea at the Software Centre. –  Luís de Sousa Oct 7 '13 at 10:56
The Java browser plugin is totally different to the Java VM. –  Braiam Mar 15 '14 at 17:55
@Braiam If you look at the other question, it addresses the browser plugin. Anything here useful to merge in though? –  Seth Mar 20 '14 at 4:14

2 Answers 2

For using Firefox with Java you must install the Icedtea plugin.

sudo apt-get install icedtea-plugin

No further actions needed.

share|improve this answer
:+1 it's right, and need execute: apt-get install default-jre –  kikicarbonell Jul 18 '14 at 13:48
@kikicarbonell unless Ubuntu is something different, that package should be installed along with icedtea-plugin. –  Braiam Jul 18 '14 at 13:54
not for my case @Braiam. I have Ubuntu 14.04 and open-jdk installed...but if only execute your command my Firefox not execute java applet...Later, I try to execute apt-get install default-jre and firefox problems was solved. –  kikicarbonell Jul 18 '14 at 14:04
@kikicarbonell firefox disables the java plugin by default. So you have to tell it to activate it. –  Braiam Jul 18 '14 at 14:25

Installing the IcedTea Java plugin:

To install the IcedTea Java plug-in, open a terminal and type:

sudo apt-get install icedtea-7-plugin

Install the Firefox plug-in - Oracle

In a terminal:

mkdir ~/.mozilla/plugins

Remove the IcedTea plugin, if it has been installed.

sudo apt-get remove icedtea6-plugin

Remove a former version of the Java plugin (may or may not be present)

rm ~/.mozilla/plugins/libnpjp2.so

Now you can install the plugin, by creating a symbolic link (you tell Firefox where the plugin is located). For 32-bit Java, use

ln -s /usr/lib/jvm/jre1.7.0/lib/i386/libnpjp2.so ~/.mozilla/plugins/

For 64-bit Java use

ln -s /usr/lib/jvm/jre1.7.0/lib/amd64/libnpjp2.so ~/.mozilla/plugins/

Confirm that the JRE has been successful by using the official Oracle website.

Source: Java installation

share|improve this answer
Are you sure you answered the question? The guy is saying he already installed the jdk and the jre. –  Luís de Sousa Oct 6 '13 at 14:22
Why compile jre from sources, why! –  Braiam Oct 6 '13 at 14:23
didn't see the question properly:) –  M.Tarun Oct 6 '13 at 15:58
have a look also at oracle.com/technetwork/java/javase/… for any doubts –  Victor Oliveira May 11 '14 at 13:01
As of Ubuntu 14.04, Java is no longer supported in the most recent version of Chrome/Chromium. –  Andreas Hartmann Jul 15 '14 at 7:48

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