Saturday, May 19, 2012

Enable Java in Firefox - Linux

This is a very common known issue that Firefox browser in Linux is not able to identify the java installation and hence we could not open java applets using Firefox browser.

There are multiple ways are available to enable java in Firefox browser. I am listing the very basic simple way to achieve the functionality here.

1. Open Firefox browser and locate preference/options menu. (Tools--> Options / Edit-->preferences)
2. Go to 'contents' tab.
3. Select 'Enable Javascript' check box.
4. Install Java (jdk) in Linux if it is not already installed.
5. Locate the below file under the java installation directory.
  libnpjp2.so


you can use the below command for locating the file,
                                      locate libnpjp2.so


Most probably the file can be find in the below directory,
<java installation directory>/jre/lib/i386/libnpjp2.so


Eg: /u01/Oracle/Middleware/jdk160_24/jre/lib/i386/libnpjp2.so


6. Locate Firefox installation directory.
7. Go to 'plugins' directory under the Firefox installation directory. You can use the below command to display only the directories,
                                     ls -lrt|grep ^d


 8. if the 'plugins' directory is not available under the Firefox installation directory, please create a plugins directory.
                                   mkdir plugins
Move to plugins directory
                                   cd plugins
9. create a soft link inside plugins directory to the libnpjp2.so file. Use the below command to create the soft link.


ln -s <java installation directory>/jre/lib/i386/libnpjp2.so


Eg: ln -s /u01/Oracle/Middleware/jdk160_24/jre/lib/i386/libnpjp2.so

10. Restart the Firefox web browser

No comments:

Post a Comment