Java plugin not working

Support and discussions for the x86/x64 Linux version of Pale Moon.

Moderators: trava90, satrow

User avatar
michaelbr
Hobby Astronomer
Hobby Astronomer
Posts: 18
Joined: 2019-03-21, 17:18

Java plugin not working

Unread post by michaelbr » 2019-03-21, 17:31

I have Ubuntu 16.04 + Pale Moon 28.4 installed on my system, I've installed Java Open JDK 1.8.0_191 and PM shows Java plugin 11.201.2, but when I go to Java home page to confirm the installation is correct, it showed that there's no plugin installed, when I type

Code: Select all

java -version
it showed

Code: Select all

java -version
openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-8u191-b12-2ubuntu0.16.04.1-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)
what I'm missing?

User avatar
Fedor2
Astronaut
Astronaut
Posts: 660
Joined: 2016-04-11, 01:26

Re: Java plugin not working

Unread post by Fedor2 » 2019-03-21, 22:15

Perhaps something wrong with java home page. Did you run your java application?

User avatar
therube
Board Warrior
Board Warrior
Posts: 1076
Joined: 2018-06-08, 17:02

Re: Java plugin not working

Unread post by therube » 2019-03-21, 23:02

32 or 64-bit PM?
Bitness needs to be the same.

What does about:plugins show?
What does Addons Manager -> Plugins show?

Is that Java 8u191?
Is that the latest available on Ubuntu?
Maybe it's blacklisted?

KB: Java

User avatar
Kruppt
Moongazer
Moongazer
Posts: 12
Joined: 2018-07-23, 22:32

Re: Java plugin not working

Unread post by Kruppt » 2019-03-22, 23:50

Run from terminal:

Code: Select all

sudo updatedb --prunepaths='/tmp /var/spool /media /mnt'
Then run:

Code: Select all

locate libnpjp2.so
Then run:

Code: Select all

ls -al /usr/lib/mozilla/plugins
Post output of above last two commands.

For reference:
https://askubuntu.com/questions/906315/ ... ser/906341#
https://developer.mozilla.org/en-US/doc ... s_Plug-ins

User avatar
michaelbr
Hobby Astronomer
Hobby Astronomer
Posts: 18
Joined: 2019-03-21, 17:18

Re: Java plugin not working

Unread post by michaelbr » 2019-03-24, 13:58

Sorry to all of you who responded to my post, had a crash on my Windows 8.1 and had to re-install it, many apps within it and configure them, sorry for the delay in getting back to you. To make things worse, After fixing Windows, Ubuntu can't start, had to find solutions on the net how to fix it, still working on it, but at least can get in. Thanks for your patience.
Thanks for your comment/suggestion, it's much appreciated
Michael

User avatar
michaelbr
Hobby Astronomer
Hobby Astronomer
Posts: 18
Joined: 2019-03-21, 17:18

Re: Java plugin not working

Unread post by michaelbr » 2019-03-24, 14:01

Fedor2 wrote:Perhaps something wrong with java home page. Did you run your java application?
I don't think Java test page has any problem, what I don't understand is Java test page uses Javascript (I think), and the site I'm trying to access uses applet, the applet is working (it brings up a dialog asking if I want to run Java), but Java test page shows that there's no Java in the browser. Is the script blocked somehow in the Pale Moon?
Last edited by michaelbr on 2019-03-24, 14:28, edited 1 time in total.
Thanks for your comment/suggestion, it's much appreciated
Michael

User avatar
michaelbr
Hobby Astronomer
Hobby Astronomer
Posts: 18
Joined: 2019-03-21, 17:18

Re: Java plugin not working

Unread post by michaelbr » 2019-03-24, 14:12

therube wrote:32 or 64-bit PM?
Bitness needs to be the same.

What does about:plugins show?
What does Addons Manager -> Plugins show?

Is that Java 8u191?
Is that the latest available on Ubuntu?
Maybe it's blacklisted?

KB: Java
Here are the answers to your question:
1) Bitness needs to be the same
Ubuntu 64-bit, Palemoon 64-bit, Java 64-bit

2) What does about:plugins show?

Code: Select all

Java(TM) Plug-in 11.201.2
    File: libnpjp2.so
    Path: /usr/lib/java/jre1.8.0_201/lib/amd64/libnpjp2.so
    Version: 11.201.2
    State: Enabled
    Next Generation Java Plug-in 11.201.2 for Mozilla browsers
3) What does Addons Manager -> Plugins show?

Code: Select all

Java(TM) Plug-in 11.201.2
4) Is that Java 8u191?
yes, it is.

5) Is that the latest available on Ubuntu?
yes, it is. I tried to install one from Java site (had to unzip, but I'm not that knowledgeable about Linux, and Java is not on the PATH, so I installed one older version from apt.

6) Maybe it's blacklisted?
where do I go to confirm it?
Thanks for your comment/suggestion, it's much appreciated
Michael

User avatar
michaelbr
Hobby Astronomer
Hobby Astronomer
Posts: 18
Joined: 2019-03-21, 17:18

Re: Java plugin not working

Unread post by michaelbr » 2019-03-24, 14:22

Kruppt wrote:

Code: Select all

locate libnpjp2.so

Code: Select all

/home/michael/.i4j_jres/1.8.0_152_64/lib/amd64/libnpjp2.so
/opt/jd2/jre/lib/amd64/libnpjp2.so
/usr/lib/java/jre1.8.0_201/lib/amd64/libnpjp2.so
/usr/lib/mozilla/plugins/libnpjp2.so
Kruppt wrote:

Code: Select all

ls -al /usr/lib/mozilla/plugins

Code: Select all

drwxr-xr-x 2 root root 4096 Mar 21 12:56 .
drwxr-xr-x 3 root root 4096 Oct 13 08:08 ..
lrwxrwxrwx 1 root root   37 Mar 13 08:19 flashplugin-alternative.so -> /etc/alternatives/mozilla-flashplugin
lrwxrwxrwx 1 root root   48 Mar 21 12:56 libnpjp2.so -> /usr/lib/java/jre1.8.0_201/lib/amd64/libnpjp2.so
Here I have some comment:
I made a mistake of installing Oracle Java, then removed it and installed OpenJRE, but it seems Oracle Java wasn't remove completely, in my PATH still shows Oracle Java, is there any tutorial showing/explaining how to clean up previous Java install and keep only the last one? As you can see in the output, it's quite messy and I'd like to clean it up, if possible.
Thanks for your comment/suggestion, it's much appreciated
Michael

User avatar
Kruppt
Moongazer
Moongazer
Posts: 12
Joined: 2018-07-23, 22:32

Re: Java plugin not working

Unread post by Kruppt » 2019-05-07, 20:45

michaelbr wrote:
2019-03-24, 14:22
Kruppt wrote:

Code: Select all

locate libnpjp2.so

Code: Select all

/home/michael/.i4j_jres/1.8.0_152_64/lib/amd64/libnpjp2.so
/opt/jd2/jre/lib/amd64/libnpjp2.so
/usr/lib/java/jre1.8.0_201/lib/amd64/libnpjp2.so
/usr/lib/mozilla/plugins/libnpjp2.so
Kruppt wrote:

Code: Select all

ls -al /usr/lib/mozilla/plugins

Code: Select all

drwxr-xr-x 2 root root 4096 Mar 21 12:56 .
drwxr-xr-x 3 root root 4096 Oct 13 08:08 ..
lrwxrwxrwx 1 root root   37 Mar 13 08:19 flashplugin-alternative.so -> /etc/alternatives/mozilla-flashplugin
lrwxrwxrwx 1 root root   48 Mar 21 12:56 libnpjp2.so -> /usr/lib/java/jre1.8.0_201/lib/amd64/libnpjp2.so
Here I have some comment:
I made a mistake of installing Oracle Java, then removed it and installed OpenJRE, but it seems Oracle Java wasn't remove completely, in my PATH still shows Oracle Java, is there any tutorial showing/explaining how to clean up previous Java install and keep only the last one? As you can see in the output, it's quite messy and I'd like to clean it up, if possible.
Just delete the /usr/lib/java/jre1.8.0_201 directory
and the libnpjp2.so soft-link in /usr/lib/mozilla/plugins.
You would then need to create a new soft-link to the libnpjp2.so
of the java version you intend to use in /usr/lib/mozilla/plugins.
I'm going to assume it is /opt/jd2/jre/lib/amd64/libnpjp2.so.

So as an example if this is the case:

Code: Select all

sudo ln -s /opt/jd2/jre/lib/amd64/libnpjp2.so /usr/lib/mozilla/plugins/libnpjp2.so

User avatar
michaelbr
Hobby Astronomer
Hobby Astronomer
Posts: 18
Joined: 2019-03-21, 17:18

Re: Java plugin not working

Unread post by michaelbr » 2019-05-09, 06:58

Kruppt wrote:
2019-05-07, 20:45
Just delete the /usr/lib/java/jre1.8.0_201 directory
and the libnpjp2.so soft-link in /usr/lib/mozilla/plugins.
You would then need to create a new soft-link to the libnpjp2.so
of the java version you intend to use in /usr/lib/mozilla/plugins.
I'm going to assume it is /opt/jd2/jre/lib/amd64/libnpjp2.so.

So as an example if this is the case:

Code: Select all

sudo ln -s /opt/jd2/jre/lib/amd64/libnpjp2.so /usr/lib/mozilla/plugins/libnpjp2.so
Thanks so much for your reply/help, after following your instructions, it worked.

Now I have another problem, and I'd like to make sure I'm doing it right. In Windows, you need to remove the old version of Java and install a new one, in Linux do you also need to remove it before installing a new one? My apps is telling me that my version is obsolete

Code: Select all

java -version
openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-8u191-b12-2ubuntu0.16.04.1-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)

and the new version is jre-8u211. What's the best way to install Java on Ubuntu 16.04? Just download Java from Java site and unpack it? It seems there's no repo for OpenJDK. Thanks again for your help.
Thanks for your comment/suggestion, it's much appreciated
Michael

User avatar
Kruppt
Moongazer
Moongazer
Posts: 12
Joined: 2018-07-23, 22:32

Re: Java plugin not working

Unread post by Kruppt » 2019-05-11, 22:28

michaelbr wrote:
2019-05-09, 06:58
Kruppt wrote:
2019-05-07, 20:45
Just delete the /usr/lib/java/jre1.8.0_201 directory
and the libnpjp2.so soft-link in /usr/lib/mozilla/plugins.
You would then need to create a new soft-link to the libnpjp2.so
of the java version you intend to use in /usr/lib/mozilla/plugins.
I'm going to assume it is /opt/jd2/jre/lib/amd64/libnpjp2.so.

So as an example if this is the case:

Code: Select all

sudo ln -s /opt/jd2/jre/lib/amd64/libnpjp2.so /usr/lib/mozilla/plugins/libnpjp2.so
Thanks so much for your reply/help, after following your instructions, it worked.

Now I have another problem, and I'd like to make sure I'm doing it right. In Windows, you need to remove the old version of Java and install a new one, in Linux do you also need to remove it before installing a new one? My apps is telling me that my version is obsolete

Code: Select all

java -version
openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-8u191-b12-2ubuntu0.16.04.1-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)

and the new version is jre-8u211. What's the best way to install Java on Ubuntu 16.04? Just download Java from Java site and unpack it? It seems there's no repo for OpenJDK. Thanks again for your help.

You use the package manager to install,upgrade,remove packages/applications on your Ubuntu OS.
Same goes for JAVA.
(apt-get, synaptic, etc)
Looking over our last post I noticed the jd2 sub-directory in the path
to the /opt/jd2/jre/lib/amd64/libnpjp2.so plugin file. This plugin was
installed via a application you installed named JDownloader 2. Another words
this is not the systems installed java plugin. That said .. the soft-link
libnpjp2.so that resides in /usr/lib/mozilla/plugins needs to be deleted.
When the soft-link has been deleted then you can proceed as follows,
open a user term and run the following commands:

Code: Select all

sudo apt-get update

Code: Select all

sudo apt-get upgrade
To install OpenJRE and the related open java plugin run:

Code: Select all

sudo apt-get install default-jre default-java-plugin
Or, if you wanted the Open Java Developerment Kit instead, not OpenJRE do as so:

Code: Select all

sudo apt-get install default-jdk default-java-plugin
Or, if you wanted both OpenJRE and OpenJDK as well as the Open JAVA Plugin. do as such:

Code: Select all

sudo apt-get install default-jre default-jdk default-java-plugin
This should have you up to date with the version of java that is compatible
with java applications that are installed or availble from the repos for Ubuntu 16.04
After these processes have finished, run:

Code: Select all

sudo update-alternatives --config java
Chose the appropriate version you intend to use.

If you want to install the Oracle Java version of JRE or JDK or both
in addition to the system installed version(s)
You would install them in either /opt or /usr/local, that is what these locations
within the Linux filesystem are for. Applications etc. can be installed in these
locations without interfering with applications/libs that be installed via the systems
package manager. I will show you an example as follows:

Using this version as an example:
https://javadl.oracle.com/webapps/downl ... 54eaaf38ab
Download to /home/michael/Downloads.
Now open a user term and run:

Code: Select all

cd /home/michael/Downloads
Then to extract the contents of the tar.gz file run:

Code: Select all

tar zxvf jre-8u211-linux-x64.tar.gz
When completed there should be a jre1.8.0_211 sub-directory in /home/michael/Downloads.
Copy this jre1.8.0_211 sub-directory to /opt via a filemanager or run command as follows in term:

Code: Select all

sudo rsync -av /home/michael/Downloads/jre1.8.0_211 /opt
Oracle JRE 1.8.0_211 is installed. Now you need to make a soft-link to the
/opt/jre1.8.0_211/lib/amd64/libnpjp2.so Oracle java plugin in /usr/lib/mozilla/plugins.
In term do as follows to do so:

Code: Select all

sudo ln -s /opt/jre1.8.0_211/lib/amd64/libnpjp2.so /usr/lib/mozilla/plugins/libnpjp2.so
Now there are two java plugins installed and would conflict with one another so you must
go to TOOLS >> ADDONS >> PLUGINS within your Palemoon browser and be sure to disable the
version you do not intend to use at this time.

When the current Oracle version becomes out dated and needs to be upgraded you would delete the
/opt/jre1.8.0_211 sub-directory and the /usr/lib/mozilla/plugins/libnpjp2.so soft-link.
Then install the new Oracle version the way I showed you above (jre-8u212-linux-x64.tar.gz for example)

User avatar
michaelbr
Hobby Astronomer
Hobby Astronomer
Posts: 18
Joined: 2019-03-21, 17:18

Re: Java plugin not working

Unread post by michaelbr » 2019-05-12, 17:22

Kruppt wrote:
2019-05-11, 22:28

open a user term and run the following commands:

Code: Select all

sudo apt-get update

Code: Select all

sudo apt-get upgrade
To install OpenJRE and the related open java plugin run:

Code: Select all

sudo apt-get install default-jre default-java-plugin
Or, if you wanted the Open Java Developerment Kit instead, not OpenJRE do as so:

Code: Select all

sudo apt-get install default-jdk default-java-plugin
Or, if you wanted both OpenJRE and OpenJDK as well as the Open JAVA Plugin. do as such:

Code: Select all

sudo apt-get install default-jre default-jdk default-java-plugin
This should have you up to date with the version of java that is compatible
with java applications that are installed or availble from the repos for Ubuntu 16.04
After these processes have finished, run:

Code: Select all

sudo update-alternatives --config java
Chose the appropriate version you intend to use.
First of all, I would like to thank you for writing so detailed explanation, it's much appreciated, this helped me a lot since I'm not that familiar with Linux.
I'm afraid the Ubuntu repo still has the old version, after did as instructed, it still shows the same version

Code: Select all

openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-8u191-b12-2ubuntu0.16.04.1-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)
Don't worry, I'll just wait for the update, I was told that Ubuntu repo is always few versions behind the current one.

Thanks again for your patience.
Thanks for your comment/suggestion, it's much appreciated
Michael

User avatar
Kruppt
Moongazer
Moongazer
Posts: 12
Joined: 2018-07-23, 22:32

Re: Java plugin not working

Unread post by Kruppt » 2019-05-13, 15:22

In term run:

Code: Select all

apt-cache policy default-jre

User avatar
michaelbr
Hobby Astronomer
Hobby Astronomer
Posts: 18
Joined: 2019-03-21, 17:18

Re: Java plugin not working

Unread post by michaelbr » 2019-05-15, 17:38

Kruppt wrote:
2019-05-13, 15:22
In term run:

Code: Select all

apt-cache policy default-jre
This is the output

Code: Select all

default-jre:
  Installed: 2:1.8-56ubuntu2
  Candidate: 2:1.8-56ubuntu2
  Version table:
 *** 2:1.8-56ubuntu2 500
        500 http://de.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status
Thanks for your comment/suggestion, it's much appreciated
Michael

User avatar
Kruppt
Moongazer
Moongazer
Posts: 12
Joined: 2018-07-23, 22:32

Re: Java plugin not working

Unread post by Kruppt » 2019-05-16, 14:54

Note that the installed and the candidate
(what is available on Ubuntu 16.04 repos) are the same.
You have the current available version of java installed
for the Ubuntu OS version you have installed. You have no
problem.

Installed: 2:1.8-56ubuntu2
Candidate: 2:1.8-56ubuntu2

User avatar
michaelbr
Hobby Astronomer
Hobby Astronomer
Posts: 18
Joined: 2019-03-21, 17:18

Re: Java plugin not working

Unread post by michaelbr » 2019-05-16, 15:30

Kruppt wrote:
2019-05-16, 14:54
Installed: 2:1.8-56ubuntu2
Candidate: 2:1.8-56ubuntu2
OK, thanks so much for your explanation.
Thanks for your comment/suggestion, it's much appreciated
Michael

User avatar
wjjunyor
New to the forum
New to the forum
Posts: 1
Joined: 2019-08-03, 17:13

Re: Java plugin not working

Unread post by wjjunyor » 2019-08-03, 17:15

Kruppt wrote:
2019-03-22, 23:50
Run from terminal:

Code: Select all

sudo updatedb --prunepaths='/tmp /var/spool /media /mnt'
Then run:

Code: Select all

locate libnpjp2.so
Then run:

Code: Select all

ls -al /usr/lib/mozilla/plugins
Post output of above last two commands.

For reference:
https://askubuntu.com/questions/906315/ ... ser/906341#
https://developer.mozilla.org/en-US/doc ... s_Plug-ins
amapora@ws001:~$ sudo updatedb --prunepaths='/tmp /var/spool /media /mnt'
[sudo] senha para amapora:
amapora@ws001:~$ locate libnpjp2.so
/usr/lib/mozilla/plugins/libnpjp2.so
amapora@ws001:~$ ls -al /usr/lib/mozilla/plugins
total 28
drwxr-xr-x 2 root root 4096 ago 3 12:11 .
drwxr-xr-x 4 root root 4096 jul 25 12:53 ..
-rw-r--r-- 1 root root 18856 mai 10 06:43 libgnome-shell-browser-plugin.so
lrwxrwxrwx 1 root root 52 ago 3 12:11 libnpjp2.so -> /usr/lib/java/jdk1.8.0_121/jre/lib/amd64/libnpjp2.so

User avatar
michaelbr
Hobby Astronomer
Hobby Astronomer
Posts: 18
Joined: 2019-03-21, 17:18

Re: Java plugin not working

Unread post by michaelbr » 2019-08-04, 05:21

Thanks so much for your reply, this problem is already solved, I had other install problem so decided to re-install Ubuntu and during the install, installed Open JRE instead of Oracle one and installed Icetea plugin, now it's working fine. Thank you for your time to reply to this topic.
Thanks for your comment/suggestion, it's much appreciated
Michael

Post Reply