LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   jdk, java plugin and firefox problem (https://www.linuxquestions.org/questions/fedora-35/jdk-java-plugin-and-firefox-problem-573229/)

ricguitar 07-29-2007 05:33 PM

jdk, java plugin and firefox problem
 
Hello everyone,

I'm running Fedora Core 7 and I've just installed jdk-6u2-linux-i586-rpm.bin from http://java.sun.com.

Then I just did that:

cd /usr/lib/firefox-2.0.0.5/plugins/
ln -s /usr/java/jdk1.6.0_02/jre/plugin/i386/ns7/libjavaplugin_oji.so

The plugin worked for konqueror, but not for firefox.

Does anyone know what the problem with firefox?

stumpedguy_frustrate 07-29-2007 08:07 PM

That's because you need to add the /usr/lib/mozilla/plugins/libjavaplugin_oji.so to the end of that command. This will create the link in firefox and allow the java runtime format to work in firefox.

Make sure you are in the folder you have done the java stuff in (not the firefox folder)
The command will look like this:
PHP Code:

ln -/usr/java/jdk1.6.0_02/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/firefox-2.0.0.5/plugins/libjavaplugin_oji.so 

Then go to a site that uses java and see if that works.



I do the same with FC6 and Firefox 2.0.0.4 and it works fine.

ricguitar 07-29-2007 09:47 PM

Sorry dude, but it's the same thing I did. But I've still tried to do what you suggest and I got the expected message that the file already exists. But thanks anyway!

LLS 07-30-2007 09:41 AM

If your links are proper, then add compat-libstdc++-33 with yum and you will be java plugin will be working.

shadowsnipes 08-01-2007 09:33 AM

An easier way to check if the plugin is installed in firefox is to go to about:plugins in firefox and look for the java plugin. Don't forget to restart firefox if you just installed/uninstalled a plugin.

You should probably have a symlink /usr/lib/firefox that points to your /usr/lib/firefox-2.0.0.5/ directory. This make it nicer for upgrades or for programs that try to install plugins globally.

You probably cannot create a proper symlink for the plugin because you already have a file with the same name in the plugin folder.

try this
Code:

cd /usr/lib/firefox-2.0.0.5/plugins/
rm -f libjavaplugin_oji.so
ln -s /usr/java/jdk1.6.0_02/jre/plugin/i386/ns7/libjavaplugin_oji.so libjavaplugin_oji.so

Now if you created the symlink specified in the second paragraph
ls -l /usr/lib/firefox/plugins
should show libjavaplugin_oji.so pointing to the appropriate plugin in the java folder.

Double check that this is not being overridden by a plugin in your users home directory (such as .mozilla/firefox/plugins or .firefox/plugins).

Edit:
sorry the smiley showed up at the top. The smiley is supposed to be a 'COLON' than a 'p' so it should read 'about : plugins' with no spaces.

imorrish 08-01-2007 11:00 PM

Same problem?
 
Guys,

I think I'm having the same problem as the original poster. I'm using FC7 on a 64-bit AMD machine so have got Firefox 2.0.0.5-1.fc7.x86_64. The Firefox site has indicated that I should be using the 32-bit version of Java to run applets, so I have installed the jre-6u2-linux-i586 download of the JRE. Stand-alone Java apps seem to be running nicely.

I've followed your instructions, and now have symbolic links as follows:
/usr/lib64/firefox to /usr/lib64/firefox-2.0.0.5
/usr/lib/firefox to /usr/lib64/firefox-2.0.0.5 (for good measure)
/usr/lib64/firefox-2.0.0.5/plugins/libjavaplugin_oji.so ---> /usr/java/jre1.6.0_02/plugin/i386/ns7/libjavaplugin_oji.so

When I check my /home/my_name/.mozilla/firefox directory, all I see are:
directory b4kel04k.default
file pluginreg.dat (which has no reference to java in it)
file profiles.ini

Any ideas?

Iain.

jay73 08-01-2007 11:32 PM

You can't install any 32 bit plug-ins for a 64 bit browser. Either install 32 bit firefox (it's in the repos) or use nspluginwrapper to get java and flash to work with the 64 bit firefox. I prefer the latter because my mplayerplug-in is pretty much 64 bit - it's really inconvenient using one browser for one type of plug-in and a second for another one.

shadowsnipes 08-02-2007 09:17 AM

Quote:

Originally Posted by imorrish
I've followed your instructions, and now have symbolic links as follows:
/usr/lib64/firefox to /usr/lib64/firefox-2.0.0.5
/usr/lib/firefox to /usr/lib64/firefox-2.0.0.5 (for good measure)
/usr/lib64/firefox-2.0.0.5/plugins/libjavaplugin_oji.so ---> /usr/java/jre1.6.0_02/plugin/i386/ns7/libjavaplugin_oji.so

When I check my /home/my_name/.mozilla/firefox directory, all I see are:
directory b4kel04k.default
file pluginreg.dat (which has no reference to java in it)
file profiles.ini

You already installed the plugin globally by creating the symbolic links above so you don't need to install them per user.

It is weird, however, that the plugins directory is missing from your home firefox directory. I imagine you could just create the plugins folder there and install the plugins in that folder if desired. Often a /home/user_name/.firefox/plugins folder is used. Again, you don't need to do this if you already installed the plugins globally.

If your plugin still does not work I am sure it is because of the 32-bit/64-bit mashup. Try following the instructions from jay73 above.

imorrish 08-02-2007 09:59 PM

Thanks to jay73 and shadowsnipes for your help. I tried both of your recommendations:
1)adding the so link in the /home/user_name/.firefox/plugins folder, and
2) tried to install using nspluginwrapper -i /usr/java/jre1.6.0_02/plugin/i386/ns7/libjavaplugin_oji.so

Neither worked, unfortunately, but the nspluginwrapper command tells me that my *.so file is "Not a valid NPAPI plugin". I tried it again, making absolutely sure that it was the 32-bit version, but no joy.

Maybe I'll be better off using the 32-bit Firefox.

jay73 08-02-2007 10:17 PM

I suspect that the nspluginwrapper is a consequence of looking in the wrong directory. Nspluginwrapper looks in the firefox plug-ins folder by default so if the java thingy is anywhere else, it won't be able to set it up.

shadowsnipes 08-03-2007 12:23 AM

As I said previously you DO NOT need to have the plugins in the users firefox directory if they are installed globally (in the /usr/lib/firefox/plugins folder). If you do have them in the users firefox directory then they will override any global settings. It sound like this may even screw up this nspluginwrapper according to Jay73.

I would suggest that you only have the plugins installed in the global folder unless you have a good reason to do otherwise.

shadowsnipes 08-03-2007 12:39 AM

Quote:

Originally Posted by jay73
I suspect that the nspluginwrapper is a consequence of looking in the wrong directory. Nspluginwrapper looks in the firefox plug-ins folder by default so if the java thingy is anywhere else, it won't be able to set it up.

I think it actually checks the /usr/lib/mozilla/plugins folder by default (according to the nspluginwrapper site). On my box I have Seamonkey installed so all my plugins are installed in firefox/plugins and mozilla/plugins, so it would not matter for me.

According to the instructions on the nspluginwrapper site it does not appear that it matters where the plugins are installed as long as you manually install them with the -i switch.

Maybe the nspluginwrapper got bugged out when you manually tried to install the exact path instead of a symlink.

nspluginwrapper -i /usr/java/jre1.6.0_02/plugin/i386/ns7/libjavaplugin_oji.so

instead of

nspluginwrapper -i /usr/lib/firefox/plugins/libjavaplugin_oji.so

I have no actual experience using this nspluginwrapper program as I have never had a need for it.

imorrish 08-04-2007 09:20 AM

Sorry guys, but I've failed again. I removed all of the excess links and now have only one symbolic link in the /usr/lib/mozilla/plugins folder, which nspluginwrapper still says is not a valid NPAPI plugin.

shadowsnipes 08-04-2007 11:57 AM

Ah, after doing some quick searching around it appears that perhaps the nspluginwrapper does not work with that version of Java. It really isn't a NPAPI plugin, but Open Java Interface.

According to the Mozilla Plugin doc Blackdown Java (1.4) should work without the need for a wrapper - yes, it has a 64-bit version plugin!
http://plugindoc.mozdev.org/linux-amd64.html

here's another page on using Blackdown Java
http://www.jeremiahstoddard.com/content/view/20/9/

but one page complained about using this and suggested using GNU classpath java plugin
http://home.subnet.at/~max/ubuntu/in...p#edgy-ff-java
(please note that GNU classpath has not implemented all of the java libraries - about up to Java 1.4)

Here's a couple of other related threads
http://ubuntuforums.org/showthread.php?t=341727
http://www.linuxforums.org/forum/red...va-plugin.html

Your only error is the NPAPI one, right? Have you seen anything like 'npviewer.bin cannot be executed'. If you have then you are still missing some 32-bit libraries.

The only other option I can think of is to use a 32-bit version of firefox or another browser. You could even possibly continue to use your 64-bit firefox, but use an extension that redirects certain pages to open in a different (32-bit) browser. IE View or IE View Lite are examples of extensions that can serve this purpose (by changing the default browser they open to something other than IE).

If I were in your position I would try the Blackdown Java first or would just settle for using 32-bit browsers for those pages. If you are worried about security issues or compatibility with new Java software, then using an older Java API (1.4) may not be for you. In that case you would definitely want to go the route of using the 32-bit browser.

I hope this is all starting to make sense to you.

Lnx805 08-04-2007 02:27 PM

Just as a side note; from what I've read on this topic there's little or no advantage to running FFox64. I had the same issue listed above and decided to go with the stable 32-bit version. If there's a definite benefit to the 64-bit FF, I may spend more time de-bugging it...


All times are GMT -5. The time now is 05:44 AM.