Unable to use java with Firefox 52 ESR

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
1
down vote

favorite












I am running Ubuntu Xenial(16.04.3 LTS).



To use Java from browser, installed firefox ESR using these commands




$ sudo add-apt-repository ppa:jonathonf/firefox-esr
$ sudo apt-get update
$ sudo apt-get install firefox-esr



Other than the ESR version of firefox, I don't have any other version of
firefox installed.



Added 'plugin.load_flash_only = false' to about:config section of firefox.



In $HOME/.mozilla/plugins, created this symlink for java plugin




$ cd $HOME/.mozilla/plugins
$ ln -s /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libnpjp2.so .



Made sure Oracle's java is the default java. /usr/lib/jvm/default-java
is a symlink pointing to /usr/lib/jvm/java-8-oracle.



With these changes, when I startup firefox and go the




http://www.java.com/verify



and click on the link




 Firefox 52 ESR users: If you'd like to run the verify app as a plugin, please click here.



I get this exception in the terminal from which firefox was started




Exception in thread "main" java.lang.NullPointerException
at sun.plugin2.main.server.JVMManager.getOrCreateBestJVMInstance(Unknown
Source)
at sun.plugin2.main.server.JVMManager.startAppletImpl(Unknown Source)
at sun.plugin2.main.server.JVMManager.startApplet(Unknown Source)
at sun.plugin2.main.server.JVMManager.startApplet(Unknown Source)
at sun.plugin2.main.server.MozillaPlugin.maybeStartApplet(Unknown Source)
at sun.plugin2.main.server.MozillaPlugin.setWindow(Unknown Source)




The java command is a symlink to /etc/alternatives/java which is a symlink to /usr/lib/jvm/java-8-oracle/jre/bin/java



I am able to run java successfully through command line




 $ java -version 
java version "1.8.0_144" Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)



Not clear why firefox has trouble using installed java.










share|improve this question

























    up vote
    1
    down vote

    favorite












    I am running Ubuntu Xenial(16.04.3 LTS).



    To use Java from browser, installed firefox ESR using these commands




    $ sudo add-apt-repository ppa:jonathonf/firefox-esr
    $ sudo apt-get update
    $ sudo apt-get install firefox-esr



    Other than the ESR version of firefox, I don't have any other version of
    firefox installed.



    Added 'plugin.load_flash_only = false' to about:config section of firefox.



    In $HOME/.mozilla/plugins, created this symlink for java plugin




    $ cd $HOME/.mozilla/plugins
    $ ln -s /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libnpjp2.so .



    Made sure Oracle's java is the default java. /usr/lib/jvm/default-java
    is a symlink pointing to /usr/lib/jvm/java-8-oracle.



    With these changes, when I startup firefox and go the




    http://www.java.com/verify



    and click on the link




     Firefox 52 ESR users: If you'd like to run the verify app as a plugin, please click here.



    I get this exception in the terminal from which firefox was started




    Exception in thread "main" java.lang.NullPointerException
    at sun.plugin2.main.server.JVMManager.getOrCreateBestJVMInstance(Unknown
    Source)
    at sun.plugin2.main.server.JVMManager.startAppletImpl(Unknown Source)
    at sun.plugin2.main.server.JVMManager.startApplet(Unknown Source)
    at sun.plugin2.main.server.JVMManager.startApplet(Unknown Source)
    at sun.plugin2.main.server.MozillaPlugin.maybeStartApplet(Unknown Source)
    at sun.plugin2.main.server.MozillaPlugin.setWindow(Unknown Source)




    The java command is a symlink to /etc/alternatives/java which is a symlink to /usr/lib/jvm/java-8-oracle/jre/bin/java



    I am able to run java successfully through command line




     $ java -version 
    java version "1.8.0_144" Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
    Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)



    Not clear why firefox has trouble using installed java.










    share|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I am running Ubuntu Xenial(16.04.3 LTS).



      To use Java from browser, installed firefox ESR using these commands




      $ sudo add-apt-repository ppa:jonathonf/firefox-esr
      $ sudo apt-get update
      $ sudo apt-get install firefox-esr



      Other than the ESR version of firefox, I don't have any other version of
      firefox installed.



      Added 'plugin.load_flash_only = false' to about:config section of firefox.



      In $HOME/.mozilla/plugins, created this symlink for java plugin




      $ cd $HOME/.mozilla/plugins
      $ ln -s /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libnpjp2.so .



      Made sure Oracle's java is the default java. /usr/lib/jvm/default-java
      is a symlink pointing to /usr/lib/jvm/java-8-oracle.



      With these changes, when I startup firefox and go the




      http://www.java.com/verify



      and click on the link




       Firefox 52 ESR users: If you'd like to run the verify app as a plugin, please click here.



      I get this exception in the terminal from which firefox was started




      Exception in thread "main" java.lang.NullPointerException
      at sun.plugin2.main.server.JVMManager.getOrCreateBestJVMInstance(Unknown
      Source)
      at sun.plugin2.main.server.JVMManager.startAppletImpl(Unknown Source)
      at sun.plugin2.main.server.JVMManager.startApplet(Unknown Source)
      at sun.plugin2.main.server.JVMManager.startApplet(Unknown Source)
      at sun.plugin2.main.server.MozillaPlugin.maybeStartApplet(Unknown Source)
      at sun.plugin2.main.server.MozillaPlugin.setWindow(Unknown Source)




      The java command is a symlink to /etc/alternatives/java which is a symlink to /usr/lib/jvm/java-8-oracle/jre/bin/java



      I am able to run java successfully through command line




       $ java -version 
      java version "1.8.0_144" Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
      Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)



      Not clear why firefox has trouble using installed java.










      share|improve this question













      I am running Ubuntu Xenial(16.04.3 LTS).



      To use Java from browser, installed firefox ESR using these commands




      $ sudo add-apt-repository ppa:jonathonf/firefox-esr
      $ sudo apt-get update
      $ sudo apt-get install firefox-esr



      Other than the ESR version of firefox, I don't have any other version of
      firefox installed.



      Added 'plugin.load_flash_only = false' to about:config section of firefox.



      In $HOME/.mozilla/plugins, created this symlink for java plugin




      $ cd $HOME/.mozilla/plugins
      $ ln -s /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libnpjp2.so .



      Made sure Oracle's java is the default java. /usr/lib/jvm/default-java
      is a symlink pointing to /usr/lib/jvm/java-8-oracle.



      With these changes, when I startup firefox and go the




      http://www.java.com/verify



      and click on the link




       Firefox 52 ESR users: If you'd like to run the verify app as a plugin, please click here.



      I get this exception in the terminal from which firefox was started




      Exception in thread "main" java.lang.NullPointerException
      at sun.plugin2.main.server.JVMManager.getOrCreateBestJVMInstance(Unknown
      Source)
      at sun.plugin2.main.server.JVMManager.startAppletImpl(Unknown Source)
      at sun.plugin2.main.server.JVMManager.startApplet(Unknown Source)
      at sun.plugin2.main.server.JVMManager.startApplet(Unknown Source)
      at sun.plugin2.main.server.MozillaPlugin.maybeStartApplet(Unknown Source)
      at sun.plugin2.main.server.MozillaPlugin.setWindow(Unknown Source)




      The java command is a symlink to /etc/alternatives/java which is a symlink to /usr/lib/jvm/java-8-oracle/jre/bin/java



      I am able to run java successfully through command line




       $ java -version 
      java version "1.8.0_144" Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
      Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)



      Not clear why firefox has trouble using installed java.







      firefox






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Sep 4 '17 at 15:33









      user3477071

      6010




      6010




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          4
          down vote



          accepted










          You can workaround this.



          Open your browser and type this:



          about:config


          Right-click on Name title, choose New Preference > Boolean



          Create a new entry with this label:



          plugin.load_flash_only


          set it false and restart your browser.



          In fact, this solution doesn't depends on which kind of java is installed and operating in this system. In this case, Openjdk plugin didn't work with Firefox ESR, but Oracle Java, installed as followed from Digital Ocean tutorial.
          Although they told that it's deprecated (because it applies to Ubuntu 12.04), the procedures are the same: you can use it in ubuntu 17.10, just downloading jdk 8u161. I consider this as the best practice for Firefox, because OpenJDK will not install libnpjp2.so, essential to activate Java in Firefox ESR.



          To activate this plugin at Firefox ESR, you must create a symlink to the folder where is installed your Oracle Java:



          mkdir </Firefox ESR installed path>/firefox/browser/plugins
          cd </Firefox ESR installed path>/firefox/browser/plugins
          ln -s </Oracle Java installed path>/jre/lib/amd64/libnpjp2.so


          There may be other ways to activate Java plugin in Firefox ESR, but this way really works. I downloaded Firefox 52 ESR right now and activated Java at there!






          share|improve this answer






















          • I already have the 'plugin.load_flash_only' setting set to 'false' in my about:config
            – user3477071
            Sep 4 '17 at 15:48










          • It's better to do ln to libnpjp2 in /usr/lib/firefox folder. Instead of cd $HOME/.mozilla/plugins, try cd /usr/lib/firefox/browser/plugins | sudo ln -s /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libnpjp2.so. Everytime I try to ln to profile folder, it doesn't work.
            – Redbob
            Sep 4 '17 at 16:09











          • Created a symlink to /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libnpjp2.so from /usr/lib/firefox and /usr/lib/firefox/plugins directories. Still, same result, get the same exception after restart of firefox.
            – user3477071
            Sep 4 '17 at 16:15










          • And to /usr/lib/firefox/browser/plugins, you created?
            – Redbob
            Sep 4 '17 at 17:35






          • 1




            Thanks @karel for the advice. I'll test about that. If Firefox 52 ESR works with newly recommended practice by DigitalOcean, I'll update it.
            – Redbob
            Mar 30 at 13:11










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "89"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f952674%2funable-to-use-java-with-firefox-52-esr%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          4
          down vote



          accepted










          You can workaround this.



          Open your browser and type this:



          about:config


          Right-click on Name title, choose New Preference > Boolean



          Create a new entry with this label:



          plugin.load_flash_only


          set it false and restart your browser.



          In fact, this solution doesn't depends on which kind of java is installed and operating in this system. In this case, Openjdk plugin didn't work with Firefox ESR, but Oracle Java, installed as followed from Digital Ocean tutorial.
          Although they told that it's deprecated (because it applies to Ubuntu 12.04), the procedures are the same: you can use it in ubuntu 17.10, just downloading jdk 8u161. I consider this as the best practice for Firefox, because OpenJDK will not install libnpjp2.so, essential to activate Java in Firefox ESR.



          To activate this plugin at Firefox ESR, you must create a symlink to the folder where is installed your Oracle Java:



          mkdir </Firefox ESR installed path>/firefox/browser/plugins
          cd </Firefox ESR installed path>/firefox/browser/plugins
          ln -s </Oracle Java installed path>/jre/lib/amd64/libnpjp2.so


          There may be other ways to activate Java plugin in Firefox ESR, but this way really works. I downloaded Firefox 52 ESR right now and activated Java at there!






          share|improve this answer






















          • I already have the 'plugin.load_flash_only' setting set to 'false' in my about:config
            – user3477071
            Sep 4 '17 at 15:48










          • It's better to do ln to libnpjp2 in /usr/lib/firefox folder. Instead of cd $HOME/.mozilla/plugins, try cd /usr/lib/firefox/browser/plugins | sudo ln -s /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libnpjp2.so. Everytime I try to ln to profile folder, it doesn't work.
            – Redbob
            Sep 4 '17 at 16:09











          • Created a symlink to /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libnpjp2.so from /usr/lib/firefox and /usr/lib/firefox/plugins directories. Still, same result, get the same exception after restart of firefox.
            – user3477071
            Sep 4 '17 at 16:15










          • And to /usr/lib/firefox/browser/plugins, you created?
            – Redbob
            Sep 4 '17 at 17:35






          • 1




            Thanks @karel for the advice. I'll test about that. If Firefox 52 ESR works with newly recommended practice by DigitalOcean, I'll update it.
            – Redbob
            Mar 30 at 13:11














          up vote
          4
          down vote



          accepted










          You can workaround this.



          Open your browser and type this:



          about:config


          Right-click on Name title, choose New Preference > Boolean



          Create a new entry with this label:



          plugin.load_flash_only


          set it false and restart your browser.



          In fact, this solution doesn't depends on which kind of java is installed and operating in this system. In this case, Openjdk plugin didn't work with Firefox ESR, but Oracle Java, installed as followed from Digital Ocean tutorial.
          Although they told that it's deprecated (because it applies to Ubuntu 12.04), the procedures are the same: you can use it in ubuntu 17.10, just downloading jdk 8u161. I consider this as the best practice for Firefox, because OpenJDK will not install libnpjp2.so, essential to activate Java in Firefox ESR.



          To activate this plugin at Firefox ESR, you must create a symlink to the folder where is installed your Oracle Java:



          mkdir </Firefox ESR installed path>/firefox/browser/plugins
          cd </Firefox ESR installed path>/firefox/browser/plugins
          ln -s </Oracle Java installed path>/jre/lib/amd64/libnpjp2.so


          There may be other ways to activate Java plugin in Firefox ESR, but this way really works. I downloaded Firefox 52 ESR right now and activated Java at there!






          share|improve this answer






















          • I already have the 'plugin.load_flash_only' setting set to 'false' in my about:config
            – user3477071
            Sep 4 '17 at 15:48










          • It's better to do ln to libnpjp2 in /usr/lib/firefox folder. Instead of cd $HOME/.mozilla/plugins, try cd /usr/lib/firefox/browser/plugins | sudo ln -s /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libnpjp2.so. Everytime I try to ln to profile folder, it doesn't work.
            – Redbob
            Sep 4 '17 at 16:09











          • Created a symlink to /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libnpjp2.so from /usr/lib/firefox and /usr/lib/firefox/plugins directories. Still, same result, get the same exception after restart of firefox.
            – user3477071
            Sep 4 '17 at 16:15










          • And to /usr/lib/firefox/browser/plugins, you created?
            – Redbob
            Sep 4 '17 at 17:35






          • 1




            Thanks @karel for the advice. I'll test about that. If Firefox 52 ESR works with newly recommended practice by DigitalOcean, I'll update it.
            – Redbob
            Mar 30 at 13:11












          up vote
          4
          down vote



          accepted







          up vote
          4
          down vote



          accepted






          You can workaround this.



          Open your browser and type this:



          about:config


          Right-click on Name title, choose New Preference > Boolean



          Create a new entry with this label:



          plugin.load_flash_only


          set it false and restart your browser.



          In fact, this solution doesn't depends on which kind of java is installed and operating in this system. In this case, Openjdk plugin didn't work with Firefox ESR, but Oracle Java, installed as followed from Digital Ocean tutorial.
          Although they told that it's deprecated (because it applies to Ubuntu 12.04), the procedures are the same: you can use it in ubuntu 17.10, just downloading jdk 8u161. I consider this as the best practice for Firefox, because OpenJDK will not install libnpjp2.so, essential to activate Java in Firefox ESR.



          To activate this plugin at Firefox ESR, you must create a symlink to the folder where is installed your Oracle Java:



          mkdir </Firefox ESR installed path>/firefox/browser/plugins
          cd </Firefox ESR installed path>/firefox/browser/plugins
          ln -s </Oracle Java installed path>/jre/lib/amd64/libnpjp2.so


          There may be other ways to activate Java plugin in Firefox ESR, but this way really works. I downloaded Firefox 52 ESR right now and activated Java at there!






          share|improve this answer














          You can workaround this.



          Open your browser and type this:



          about:config


          Right-click on Name title, choose New Preference > Boolean



          Create a new entry with this label:



          plugin.load_flash_only


          set it false and restart your browser.



          In fact, this solution doesn't depends on which kind of java is installed and operating in this system. In this case, Openjdk plugin didn't work with Firefox ESR, but Oracle Java, installed as followed from Digital Ocean tutorial.
          Although they told that it's deprecated (because it applies to Ubuntu 12.04), the procedures are the same: you can use it in ubuntu 17.10, just downloading jdk 8u161. I consider this as the best practice for Firefox, because OpenJDK will not install libnpjp2.so, essential to activate Java in Firefox ESR.



          To activate this plugin at Firefox ESR, you must create a symlink to the folder where is installed your Oracle Java:



          mkdir </Firefox ESR installed path>/firefox/browser/plugins
          cd </Firefox ESR installed path>/firefox/browser/plugins
          ln -s </Oracle Java installed path>/jre/lib/amd64/libnpjp2.so


          There may be other ways to activate Java plugin in Firefox ESR, but this way really works. I downloaded Firefox 52 ESR right now and activated Java at there!







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 31 at 1:46

























          answered Sep 4 '17 at 15:43









          Redbob

          1,123319




          1,123319











          • I already have the 'plugin.load_flash_only' setting set to 'false' in my about:config
            – user3477071
            Sep 4 '17 at 15:48










          • It's better to do ln to libnpjp2 in /usr/lib/firefox folder. Instead of cd $HOME/.mozilla/plugins, try cd /usr/lib/firefox/browser/plugins | sudo ln -s /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libnpjp2.so. Everytime I try to ln to profile folder, it doesn't work.
            – Redbob
            Sep 4 '17 at 16:09











          • Created a symlink to /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libnpjp2.so from /usr/lib/firefox and /usr/lib/firefox/plugins directories. Still, same result, get the same exception after restart of firefox.
            – user3477071
            Sep 4 '17 at 16:15










          • And to /usr/lib/firefox/browser/plugins, you created?
            – Redbob
            Sep 4 '17 at 17:35






          • 1




            Thanks @karel for the advice. I'll test about that. If Firefox 52 ESR works with newly recommended practice by DigitalOcean, I'll update it.
            – Redbob
            Mar 30 at 13:11
















          • I already have the 'plugin.load_flash_only' setting set to 'false' in my about:config
            – user3477071
            Sep 4 '17 at 15:48










          • It's better to do ln to libnpjp2 in /usr/lib/firefox folder. Instead of cd $HOME/.mozilla/plugins, try cd /usr/lib/firefox/browser/plugins | sudo ln -s /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libnpjp2.so. Everytime I try to ln to profile folder, it doesn't work.
            – Redbob
            Sep 4 '17 at 16:09











          • Created a symlink to /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libnpjp2.so from /usr/lib/firefox and /usr/lib/firefox/plugins directories. Still, same result, get the same exception after restart of firefox.
            – user3477071
            Sep 4 '17 at 16:15










          • And to /usr/lib/firefox/browser/plugins, you created?
            – Redbob
            Sep 4 '17 at 17:35






          • 1




            Thanks @karel for the advice. I'll test about that. If Firefox 52 ESR works with newly recommended practice by DigitalOcean, I'll update it.
            – Redbob
            Mar 30 at 13:11















          I already have the 'plugin.load_flash_only' setting set to 'false' in my about:config
          – user3477071
          Sep 4 '17 at 15:48




          I already have the 'plugin.load_flash_only' setting set to 'false' in my about:config
          – user3477071
          Sep 4 '17 at 15:48












          It's better to do ln to libnpjp2 in /usr/lib/firefox folder. Instead of cd $HOME/.mozilla/plugins, try cd /usr/lib/firefox/browser/plugins | sudo ln -s /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libnpjp2.so. Everytime I try to ln to profile folder, it doesn't work.
          – Redbob
          Sep 4 '17 at 16:09





          It's better to do ln to libnpjp2 in /usr/lib/firefox folder. Instead of cd $HOME/.mozilla/plugins, try cd /usr/lib/firefox/browser/plugins | sudo ln -s /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libnpjp2.so. Everytime I try to ln to profile folder, it doesn't work.
          – Redbob
          Sep 4 '17 at 16:09













          Created a symlink to /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libnpjp2.so from /usr/lib/firefox and /usr/lib/firefox/plugins directories. Still, same result, get the same exception after restart of firefox.
          – user3477071
          Sep 4 '17 at 16:15




          Created a symlink to /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libnpjp2.so from /usr/lib/firefox and /usr/lib/firefox/plugins directories. Still, same result, get the same exception after restart of firefox.
          – user3477071
          Sep 4 '17 at 16:15












          And to /usr/lib/firefox/browser/plugins, you created?
          – Redbob
          Sep 4 '17 at 17:35




          And to /usr/lib/firefox/browser/plugins, you created?
          – Redbob
          Sep 4 '17 at 17:35




          1




          1




          Thanks @karel for the advice. I'll test about that. If Firefox 52 ESR works with newly recommended practice by DigitalOcean, I'll update it.
          – Redbob
          Mar 30 at 13:11




          Thanks @karel for the advice. I'll test about that. If Firefox 52 ESR works with newly recommended practice by DigitalOcean, I'll update it.
          – Redbob
          Mar 30 at 13:11

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f952674%2funable-to-use-java-with-firefox-52-esr%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          pylint3 and pip3 broken

          Missing snmpget and snmpwalk

          How to enroll fingerprints to Ubuntu 17.10 with VFS491