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.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communityI 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.
If you are using a version after 52 (not ESR), which disabled NPAPI, you are out of luck. If you are using one prior, which you absolutely wouldn't want to, you can install 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.
To install the IcedTea Java plug-in, open a terminal and type:
sudo apt-get install icedtea-7-plugin
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
Beginning in Firefox version 52, support for NPAPI plugins (java applets) in Firefox has ended, due to performance and security issues, the way that I manage to run java applets is to install the Extended Support Release (ESR) of firefox.
download here: https://www.mozilla.org/en-US/firefox/organizations/all/
more details here: https://support.mozilla.org/en-US/kb/npapi-plugins
If you just downloaded and installed java jdk from oracle, then, let's say you have installed jdk-8u91-linux-x64.tar.gz on
/my/java/directory/
Then you'll have a directory like:
/my/java/directory/jdk1.8.0_91/
All you have to do is go to your ubuntu firefox plugins directory and create a link:
$: cd /usr/lib/firefox-addons/plugins/
$: sudo ln -s /my/java/directory/jdk1.8.0_91/jre/lib/amd64/libnpjp2.so
/usr/lib/mozilla/plugins
.
Jan 23, 2017 at 16:05
This is an old thread, but I stumbled upon it while googling a solution to my problem today. I figured someone else might be in the same situation.
I need in-browser Java for legacy work-related websites, and the oracle java plugin does not cut it. After a long trial-and-error approach, I got IcedTea working consistently in an older version of firefox like this:
One of my colleagues created a script to remove the old firefox, and untar it on every run. That way it never gets updated accidentally. Be sure not to do this with your main firefox application.
I hope this helps you.
Its been a battle, especially since I went through this a couple of months ago with 14.04, forgot the solution, upgraded to 16.04.....
It is different I had Iced-tea and Oracle working under firefox in 14.04. I actually prefer Oracle (not generally but my use almost requires it) so I only have that now. I did not attempt any multiple installs or repositories. Symlinks as per most of the instructions out there are no good either.
In the end, in Firefox went to Edit--> Preference-->Applications then scrolled down to the JNLP file extension and picked "Use other..." from the drop down menu. Then found javaws from the relevant directory.
It is only a workaround, and Im not sure if it will suit your needs. Keep in mind most plugins will be deaded by March.