Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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.

share|improve this 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
@Seth but you want OP to read through all of that for something that can be solved in 1 line? The other is an overkill answer, the question is just "how to install Java?" while this is "how to install Java browser plugin for firefox?", those are different questions and can't be merged. –  Braiam Mar 20 '14 at 12:08
I agree with @Braiam above. This is a different question because updating the Java version used by firefox is not the same as simply installing java. I personally have oracle Java 6, 7, and 8 JDKs but installing icedtea did nothing for my firefox. I had to follow these instructions with a JRE downloaded from Then firefox was happy. –  hinerm Jul 25 at 19:19

2 Answers 2

You only installed the OpenJDK JRE, which would allow you to execute Java binaries locally using the java binary. This however, isn't enough to execute Java web applets on your browser, which can be accomplished by installing the Icedtea plugin:

sudo apt-get install icedtea-plugin

Then go to about:addons, in the plugin section, check if the plugin is enabled. Mozilla disables insecure plugins by default, that means that Java is disable even after installation due security concerns. You need to activate it before using it.

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/

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/ ~/.mozilla/plugins/

For 64-bit Java use

ln -s /usr/lib/jvm/jre1.7.0/lib/amd64/ ~/.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… 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

Your Answer


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.