Java plugin no longer supported in firefox 52. Is there any other way to run java applets in firefox

37,786

Solution 1

Further commentary from Oracle is linked by the page you quoted, Firefox has taken the explicit decision to stop providing the NPAPI to plugins aside from Flash, essentially meaning, Firefox will not listen to anything Java might try to say.

Firefox 52 and above

Beginning with Firefox 52 (released March 2017), plug-in support is limited to Adobe Flash, and drops support for NPAPI, impacting plugins for Java, Silverlight, and other similar NPAPI based plugins.

If you have problems accessing Java applications using Firefox, Oracle recommends using Internet Explorer (Windows) or Safari (Mac OS X) instead.

Your solution then would normally have to be to run Java applets in a browser that allows Java plugins. Try Chromium or QupZilla for example.

If you really want Java in Firefox, you can install Firefox ESR instead. Note that this one will not track regular Firefox version anymore, so your Firefox will grow old feature-wise, but still keep receiving security updates.

Solution 2

The following steps should work (tested on Mint 18 based on Ubuntu 16.04LTS):

  1. Download and extract the Firefox ESR install from here: https://www.mozilla.org/en-US/firefox/organizations/all/
  2. Launch Firefox and type about:config in the location bar
  3. Accept the risks and then add a key (right click mouse > New > Boolean)
  4. Call the key plugin.load_flash_only and set it to false
  5. Add a Firefox extension for switching the user agent eg. User-Agent Switcher
  6. Set the user agent to an earlier version of Firefox on Linux eg. Mozilla/5.0 (X11; Linux i586; rv:31.0) Gecko/20100101 Firefox/31.0
  7. Close Firefox
  8. Download the tar.gz JRE package for Linux on www.java.com and store the file in the folder Downloads in your home folder (ie. ~/Downloads). It will be of the form: jre-8u161-linux-i586.tar.gz for the 32 bit version. Choose the 32 bit or 64 bit version according to the version of Firefox ESR you downloaded.
  9. Then do the following to extract the JRE in a shell (replacing with 64 bit versions if needed):

    sudo mkdir -p -v /opt/java/32
    cd ~/Downloads
    tar -zxvf jre-8u161-linux-i586.tar.gz
    sudo mv -v jre1.8.0_* /opt/java/32
    
  10. Now the Java needs to be linked to Firefox. In a shell:

    mkdir -p ~/.mozilla/plugins/
    cd /opt/java/32/jre1.8.0_161
    ln -sf $PWD/lib/i386/libnpjp2.so ~/.mozilla/plugins/
    
  11. Launch Firefox and verify your Java version here: https://www.java.com/en/download/installed.jsp

  12. If it doesn't work and the wrong Java plugin appears to be loaded eg. IcedTea, then remove them in a shell:

    sudo apt-get remove icedtea-plugin
    sudo apt-get remove icedtea-8-plugin
    sudo apt-get remove icedtea-netx
    sudo apt-get remove icedtea-netx-common 
    
  13. If Firefox or Java or audio in Java don't work, there may be missing dependencies. Try the below (remove :i386 for 64 bit):

    sudo apt-get install libgtk-3-0:i386 libasound2:i386 libdbus-glib-1-2:i386 libxt6:i386 libxtst6:i386 libcanberra-gtk-module:i386 libcanberra-gtk3-module:i386 topmenu-gtk3:i386 libpangoxft-1.0-0:i386 libxft2:i386 libpangox-1.0-0:i386 libxmu6:i386 libxv1:i386 libasound2-plugins:i386
    
Share:
37,786

Related videos on Youtube

A Umar Mukthar
Author by

A Umar Mukthar

Updated on September 18, 2022

Comments

  • A Umar Mukthar
    A Umar Mukthar over 1 year

    Recently I installed Oracle Java. It worked fine, But with the recent upgrade with Firefox throws an error.

    I checked it here, which says:

    Starting with Firefox Version 52 (released in March 2017), Firefox has limited support for plug-ins, and therefore will not run Java. Use the Java Control Panel to find the installed Java version.

    I double checked the symbolic link also. It is configured properly

    $ java -version
    java version "1.8.0_121"
    Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
    

    How can I run java applets in firefox?

  • Gunnar Hjalmarsson
    Gunnar Hjalmarsson about 7 years
    There is a way to make standard Firefox support NPAPI plugins for a few more months; please see this answer.
  • taifwa
    taifwa about 7 years
    Interesting. Question is though, will that work in Firefox 53? 54? As the other answer states, it's what keeps it going in ESR, but the ESR release will be remianing at 52.. probably for the very reason that it will be removed entirely in a future version. This is but speculation of course.
  • Gunnar Hjalmarsson
    Gunnar Hjalmarsson about 7 years
    My theory is that it will work as long as 52 is the latest ESR. But I don't really know. We'll know in a couple of weeks when Firefox 53 is released.
  • N0rbert
    N0rbert over 6 years
    Firefox ESR is available on Jonathon F's PPA. It passes Java Plugin check. firefox-esr package was requested on LaunchPad (see bug 1676164).
  • i336_
    i336_ over 6 years
    Regarding the first comment, that stopped working in Firefox 54.
  • mcarans
    mcarans about 6 years
    Thanks to this guide for the extra dependencies added into my answer above: gist.github.com/mshkrebtan/407786e334847544b40e7d6a8a53d247