Jump to content

how to install the java plugin in firefox

Recommended Posts

PLEASE NOTE, the java download filename and VERSION changes often so the below filename may NOT be what you have just downloaded. In other words, please use YOUR filename in the commands below and NOT the one that I reference to otherwise  you will not get this working.
In addition the below TIP is for fedora core 1,2,3. For Fedora Core release 4  do this https://www.linux-noob.com/forums/index.php?showtopic=1707 and scroll down to "Now lets install Java", thats the bit you need.


first of all, why am i doing this small howto, well the 'install missing plugin' for java in firefox didn't work for me, it listed the 'manual installation' icon instead.


so this is what i did in Fedora Core Release 3 using Firefox 1


go to suns site and get the latest java rpm




download the linux rpm


once done, install it by doing this (login as root by typing su - in a console, thats a 'su' followed by a space, followed by a minus.)


now, cd (change directory) to the directory that you downloaded the rpm to, more than likely it's /home/your_user_name


so if you are anyweb do this,


cd /home/anyweb


then do this... (PLEASE NOTE, the java download filename changes often so the below filename may NOT be what you have just downloaded, to check what you did download try doing this)


ls |grep jre


once you have the 'filename' (it could be j2re-1_4_2_06-linux-i586-rpm.bin for example...) then apply THAT to the instructions below,



[root@localhost anyweb]# chmod +x jre-1_5_0-linux-i586-rpm.bin
[root@localhost anyweb]# ./jre-1_5_0-linux-i586-rpm.bin
Do you agree to the above license terms? [yes or no]
UnZipSFX 5.42 of 14 January 2001, by Info-ZIP (Zip-Bugs@lists.wku.edu).
 inflating: jre-1_5_0-linux-i586.rpm
Preparing...                ########################################### [100%]
  1:jre                    ########################################### [100%]



ok now it's installed, lets link firefox plugins directory.


in your home directory (eg: /home/anyweb) there should be a hidden directory called mozilla.


To find the hidden directories, remember that they are all starting with a . (FULLSTOP/PERIOD) so cd /home/anyweb/.mozilla/plugins will get you to the directory.
so to link this correctly you need to identify your mozilla (yes mozilla !) plugins directory


here is mine




NOTE: if you do NOT have a /home/username/.mozilla/plugins directory that is because you have not installed any plugins YET in FireFox. If so, you will need to create the directory as the 'normal user' (you) and not as root. Open up another terminal (console) and type

cd .mozilla
mkdir plugins


cd to that directory (change to that dir) and ln -s (symbolic link) to the java plugin.


REMINDER: the java download filename and VERSION changes often so the below filename may NOT be what you have just downloaded. In other words, please use YOUR filename in the commands below and NOT the one that I reference to otherwise  you will not get this working.


here's the code now that you have checked what version you downloaded :)



cd /home/anyweb/.mozilla/plugins
[anyweb@localhost plugins]$ ln -s /usr/java/jre1.5.0/plugin/i386/ns7/libjavaplugin_oji.so
[anyweb@localhost plugins]$ ls
flashplayer.xpt  libflashplayer.so  libjavaplugin_oji.so


ok thats it


once done, close firefox and restart it.


in the address bar type this


and press enter, you should hopefully now see the following:-


Installed plug-ins

Find more information about browser plug-ins at Netscape.com.

Help for installing plug-ins is available from plugindoc.mozdev.org.

Java Plug-in 1.5.0-b64


    File name: libjavaplugin_oji.so

    Java Plug-in 1.5.0


MIME Type  Description  Suffixes  Enabled

application/x-java-vm  Java Yes

application/x-java-applet  Java Yes

application/x-java-applet;version=1.1  Java Yes

application/x-java-applet;version=1.1.1  Java Yes

application/x-java-applet;version=1.1.2  Java Yes

application/x-java-applet;version=1.1.3  Java Yes

application/x-java-applet;version=1.2  Java Yes

application/x-java-applet;version=1.2.1  Java Yes

application/x-java-applet;version=1.2.2  Java Yes

application/x-java-applet;version=1.3  Java Yes

application/x-java-applet;version=1.3.1  Java Yes

application/x-java-applet;version=1.4  Java Yes

application/x-java-applet;version=1.4.1  Java Yes

application/x-java-applet;version=1.4.2  Java Yes

application/x-java-applet;version=1.5  Java Yes

application/x-java-applet;jpi-version=1.5  Java Yes

application/x-java-bean  Java Yes

application/x-java-bean;version=1.1  Java Yes

application/x-java-bean;version=1.1.1  Java Yes

application/x-java-bean;version=1.1.2  Java Yes

application/x-java-bean;version=1.1.3  Java Yes

application/x-java-bean;version=1.2  Java Yes

application/x-java-bean;version=1.2.1  Java Yes

application/x-java-bean;version=1.2.2  Java Yes

application/x-java-bean;version=1.3  Java Yes

application/x-java-bean;version=1.3.1  Java Yes

application/x-java-bean;version=1.4  Java Yes

application/x-java-bean;version=1.4.1  Java Yes

application/x-java-bean;version=1.4.2  Java Yes

application/x-java-bean;version=1.5  Java Yes

application/x-java-bean;jpi-version=1.5  Java Yes





Edited by anyweb
  • Like 2
Link to post
Share on other sites
  • 1 month later...

So, sun decided to change its layout a bit, the link in anywebs post is actually to download jre 1.4.2. the instructions provided will not work, specifically the ln -s line to link the lib to firefox.


simple fix..


go here, and make sure you select the JRE 5.0 Update 1.




Once you've done this, find the libjavaplugin_oji.so file


updatedb;locate libjavaplugin_oji.so


then run the ln -s with the result you got from the locate command.


Take note, on my system i got 2 results.




I chose the first one to link to..



cd ~/.mozilla/plugins

ln -s /usr/java/jre1.5.0_01/plugin/i386/ns7/libjavaplugin_oji.so


Now it should link fine. restart firefox and you should be good to go :lol:

  • Like 1
Link to post
Share on other sites

If you want to add the plugin globally link it to your firefox plugins dir for 1.0 version it would be:


ln -s /usr/java/j2re1.4.2_06/plugin/i386/ns610-gcc32/libjavaplugin_oji.so /usr/lib/firefox-1.0/plugins

Link to post
Share on other sites
  • 2 weeks later...

Thanks flukex and grep420 for pointing out that :)


If anyone has any other issues with installing the java plugin in FireFox in Fedora Core Release 3 then please post your issues here so that others may learn.


We all need to help each other to help make linux-noob.com a better place for noobs to learn how to get to grips with linux :)


because it sure ain't easy by yourself





linux-noob extrodinaire.

Link to post
Share on other sites
  • 2 weeks later...
  • 1 year later...

Boy was that confusing! (to the newbie learner that is :unsure: )


A days worth of work and I've finally got java on my FC4, boy, never wanna go thru all that again, my heads still spinning :lol::D


Thanks for this post guys :)

Link to post
Share on other sites
  • 1 year later...

you must chmod +x the_new_name_of_the_file.bin and not the name in the HOWTO above,




Link to post
Share on other sites

what file did you download (more details please)


it would be a good idea to copy paste your commands and resulting errors here along with an ls -al of the directory you are in (plus pwd to see what directory it is)


so do this


ls -al


then paste that here, plus do the commands (chmod +x..... ) and paste the output here




Link to post
Share on other sites

thats because you have probably linked it (ln -s) to the wrong plugin,


as I've asked already, PASTE the commands you have tried here so we can see what you are doing, it's hard to guess what you are doing,


in addition, WHICH jave download did you try with ?




Link to post
Share on other sites
  • 3 years later...

firefox 5 on x86_64 requires the 32 bit plugin


/usr/java/<latest version>/lib/i386/libnpjp2.so


The Linux x64 rpm does not include it.


attempting to install the 32 version after you have already installed the 64 bit version




tells you

package jre-1.6.0_26-fcs.i586 is already installed


work around

extract the files from the rpm


 rpm2cpio jre-6u26-linux-i586.rpm | cpio -idmv

copy the i386 directory to the latest release directory

cp -R ~/Downloads/usr/java/jre1.6.0_26/lib/i386 /usr/java/jre1.6.0_26/lib/

update the link in your ~/.mozilla/plugins

ln -sf /usr/java/jre1.6.0_26/lib/i386/libnpjp2.so .

about:plugins to verify



Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...