Java plugin installation on Centos – Firefox

Sometimes you may get the error “You need to install the latest Java Plugin. Please Click OK” while trying to access Java applications in your web browsers like Firefox, chrome etc. In order to resolve this issue you need to install Java on your system. This tutorial will help you to install the same without much difficulty.

I have included Java installation on Centos with Firefox as a web browser

Before proceeding with installation create a new directory called /usr/java and download required Java rpm packages from their official website in to it

[root@HostDire ~]#  mkdir /usr/java
[root@HostDire ~]# cd /usr/java
[root@HostDire ~]# wget

Now, execute the rpm files to install Java programs on your system.

[root@HostDire ~]# rpm -ivh /home/basejump/Downloads/jre-7u21-linux-x64.rpm

Once you have successfully executed the command, check your work by typing.

[root@HostDire ~]# java -version

Sample output is as follows.

[root@HostDire ~]# java -version
Java version “1.7.0_55”
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)
[root@HostDire ~]#

If symbolic links are not properly pointed, then you will get an error message such as

[root@HostDire ~]# -bash: /usr/bin/java: No such file or directory

We have installed Java under /usr/java/, so you can browse the Java binary in the path “/usr/java/jre1.7.0_55/bin/java”, symlink the same to “/usr/bin/java”

[root@HostDire ~]# ln -s /usr/java/jre1.7.0_55/bin/java /usr/bin/java

Remove downloaded RPM file.

[root@HostDire ~]# rm /usr/java/jre-7u55-linux-x64.rpm

Finally, enable Java support in Firefox for that we need to find the firefox plugin file which should be present under Java installation folder. You can use find command to locate the file.

[root@HostDire ~]# find /usr/java/ -type f -name libnpjp


Create a symbolic link, so Firefox knows where to find the Java plug-in.

[root@HostDire ~]# cd /usr/lib64/mozilla/plugins
[root@HostDire ~]# ln -s /usr/java/jre1.7.0_21/lib/amd64/

Please note for 32 bit systems there is a change in plugin directory. It should be under “/usr/lib/mozilla/plugins”.
[root@HostDire ~]# cd /usr/lib/mozilla/plugins

Now restart your web browser and enter about:plugins in the URL location bar, you should see a list of enabled Java plugin.

Hope you find this page useful.

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts