Abhishek Mahanty's WeblogSunny Days... |
|
Sunday Feb 24, 2008
Java Plugin for Firefox on Linux
I hit a page that had a Java applet and got the following "Missing Plugin" message. Basically, my browser - firefox was unable to locate a Java Plugin needed to execute the applet on the page. It also gave me an option to "install the missing plugin" which essentially involved downloading a complete JRE which would take time. However, since I already had the latest JRE installed on my system, this is how I went about configuring firefox to use the same. 1. View the contents of the firefox plugins folder to look for existing/older Java plugins (if any)
abhi@abhiltlnx(~)$ type firefox
firefox is /usr/bin/firefox
abhi@abhiltlnx(~)$ ls -ll /usr/bin/firefox
lrwxrwxrwx 1 root root 25 2008-02-08 03:05 /usr/bin/firefox -> ../lib/firefox/firefox.sh
abhi@abhiltlnx(~)$ ls -lth /usr/lib/firefox/
total 12M
drwxr-xr-x 2 root root 4.0K 2008-02-08 03:05 icons
drwxr-xr-x 2 root root 4.0K 2008-02-08 03:05 plugins
drwxr-xr-x 6 root root 4.0K 2008-02-08 03:05 res
drwxr-xr-x 2 root root 4.0K 2008-02-08 03:05 searchplugins
drwxr-xr-x 2 root root 4.0K 2008-02-08 03:05 greprefs
drwxr-xr-x 3 root root 4.0K 2008-02-08 03:05 chrome
drwxr-xr-x 2 root root 4.0K 2008-02-08 03:05 components
drwxr-xr-x 5 root root 4.0K 2008-02-08 03:05 defaults
drwxr-xr-x 2 root root 4.0K 2008-02-08 03:05 dictionaries
drwxr-xr-x 5 root root 4.0K 2008-02-08 03:05 extensions
-rwxr-xr-x 1 root root 9.4M 2007-09-25 00:22 firefox-bin
-rwxr-xr-x 1 root root 14K 2007-09-25 00:22 mozilla-xremote-client
-rwxr-xr-x 1 root root 107K 2007-09-25 00:22 libxpcom_compat.so
-rwxr-xr-x 1 root root 798K 2007-09-25 00:22 libxpcom_core.so
-rwxr-xr-x 1 root root 9.6K 2007-09-25 00:22 libxpcom.so
-rwxr-xr-x 1 root root 14K 2007-09-25 00:22 libxpistub.so
-rwxr-xr-x 1 root root 62K 2007-09-25 00:22 updater
-rwxr-xr-x 1 root root 621K 2007-09-25 00:22 libmozjs.so
-rwxr-xr-x 1 root root 22K 2007-09-25 00:22 xpicleanup
-rw-r--r-- 1 root root 158 2007-09-25 00:22 browserconfig.properties
-rwxr-xr-x 1 root root 6.1K 2007-09-25 00:22 firefox.sh
-rw-r--r-- 1 root root 177 2007-09-25 00:19 readme.txt
-rwxr-xr-x 1 root root 11K 2007-09-25 00:19 run-mozilla.sh
-rw-r--r-- 1 root root 145 2007-09-25 00:19 updater.ini
abhi@abhiltlnx(~)$ ls -lth /usr/lib/firefox/plugins/
total 24K
-rwxr-xr-x 1 root root 22K 2007-09-25 00:22 libnullplugin.so
2. Locate the Java plugin library file in the installed JDK/JRE
abhi@abhiltlnx(~)$ type java
java is hashed (/usr/bin/java)
abhi@abhiltlnx(~)$ ls -ll /usr/bin/java
lrwxrwxrwx 1 root root 30 2008-02-17 06:22 /usr/bin/java -> /opt/java/jdk1.6.0_04/bin/java
abhi@abhiltlnx(~)$ cd /opt/java/jdk1.6.0_04/
abhi@abhiltlnx(/opt/java/jdk1.6.0_04)$ ls -lth jre/plugin/i386/ns7/
total 140K
-rwxr-xr-x 1 root root 134K 2007-12-14 15:04 libjavaplugin_oji.so
abhi@abhiltlnx(/opt/java/jdk1.6.0_04)$
3. Create a soft/symbolic link to the java plugin file in the firefox plugins folder.
abhi@abhiltlnx(/opt/java/jdk1.6.0_04)$ sudo ln -s jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/firefox/plugins/
root's password:
abhi@abhiltlnx(/opt/java/jdk1.6.0_04)$ ls -lth /usr/lib/firefox/plugins/
total 28K
lrwxrwxrwx 1 root root 62 2008-02-26 00:54 libjavaplugin_oji.so -> /opt/java/jdk1.6.0_04/jre/plugin/i386/ns7/libjavaplugin_oji.so
-rwxr-xr-x 1 root root 22K 2007-09-25 00:22 libnullplugin.so
abhi@abhiltlnx(/opt/java/jdk1.6.0_04)$
Exit and restart firefox. You should be able to view the applet on the page.
If you have any issues, make sure that Java has been enabled in the content tab of the firefox preferences dialog (Edit -> Preferences -> Content)
4. View Java Console
abhi@abhiltlnx(/opt/java/jdk1.6.0_04/bin)$ javaws -viewer &
[1] 14233
abhi@abhiltlnx(/opt/java/jdk1.6.0_04/bin)$
![]()
Restart firefox and now when an applet gets executed, you'll view the Java Console with all the messages. Resources:
To learn more:
Posted at 12:00AM Feb 24, 2008 by Abhishek Mahanty in Technical | Comments[2] |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Disclaimer: This is a personal weblog, I do not speak for my employer, Sun Microsystems.
In order to add Acrobat Reader plugin to firefox follow instructions at - http://plugindoc.mozdev.org/linux-amd64.html#acroread-npwrap
1. Download acrobat reader RPM first and then install it
# rpm -ivh AdbeRdr9.1.2-1_i486linux_enu.rpm
2. Using nspluginwrapper add the plugin to firefox
# nspluginwrapper -i /opt/Adobe/Reader9/Browser/intellinux/nppdf.so
Posted by Abhishek Mahanty on October 22, 2009 at 12:16 PM IST #
To install Java plugin in Firefox on a 64-bit openSUSE 11.1:
root@abhiltlnx(~)# ln -sf /opt/java/jdk1.6.0_16/jre/lib/amd64/libnpjp2.so /usr/lib64/browser-plugins/
The folder "/usr/lib64/browser-plugins/"
is a common plugins folder for all installed browsers.
Posted by Abhishek Mahanty on October 27, 2009 at 06:55 AM IST #