Please support VectorLinux!

Author Topic: Firefox/Java problems  (Read 3662 times)

RogueProgrammer1

  • Member
  • *
  • Posts: 6
Firefox/Java problems
« on: January 01, 2013, 08:52:43 pm »
So, I recently switched to VectorLinux 7.0 Light. Having tried half a dozen other distributions in the past, I eventually decided that it wasn't worth the learning curve and switched back to XP. I'm back to Linux, and this is by far my favorite. I think Microsoft lost another customer for good.

Unfortunately, that doesn't mean all is well and good. For the life of me I cannot get the Java plugin to work with Firefox. I understand the distro came with a JRE. I uninstalled that so there would be no conflicts when I installed JDK 1.7.0 update 10. JDK works like a charm; I can use all of the archiving tools, compiling tools, etc.... It does not work with Firefox though.

Other forum posts on the subject seem to indicate making a link between the jre plugin and mozilla's plugin folder via something like this:
Code: [Select]
ln -s /usr/lib/java/jre/plugin/i386/ns7/libnpjp2.so /usr/lib/mozilla/plugins/libnpjp2.so
I don't know if it matters at all, but the plugin in the jre in my jdk is not named libnpjp2.so, but rather libjavaplugin_oji.so. I tried a couple different variations of the command above. Both seemed successful in that they made a link to the appropriate directory, but neither allowed use of Java via Firefox, and neither made it visible in the plugin section of the Add-ons Manager in Firefox. The variations are as follows:

Code: [Select]
ln -s /usr/lib/java/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/libnpjp2.so
Code: [Select]
ln -s /usr/lib/java/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/libjavaplugin_oji.so
I did delete the previous links before trying any new ones. I did close Firefox before executing the commands. I did have root access to execute the commands. I did restart the computer after executing before starting Firefox again. I don't know if any of that really mattered, but I tried it.

So, is this a problem with Firefox 11.0? Is this a problem with Firefox? Is there something stupid I'm missing to enable Firefox to use the Java plugin? Could somebody please help? A detailed guide would be nice, but a nudge in the right direction would be just as appreciated.

Thanks in advance.

hata_ph

  • Packager
  • Vectorian
  • ****
  • Posts: 3261
  • -- Just being myself --
Re: Firefox/Java problems
« Reply #1 on: January 01, 2013, 10:29:57 pm »
You only need libnpjp2.so inside your /usr/lib/mozilla/plugins folder...it should contain a symlink to /usr/lib/java/lib/i386/libnpjp2.so...installing jre should work out of the box...

btw, libjavaplugin_oji.so is not needed anymore

http://www.oracle.com/technetwork/java/javase/manual-plugin-install-linux-136395.html

RogueProgrammer1

  • Member
  • *
  • Posts: 6
Re: Firefox/Java problems
« Reply #2 on: January 02, 2013, 09:10:50 am »
I removed all other symlinks and created the one you specified. Firefox still does not recognize that Java is installed on the machine. Is there a particular version of Firefox I need to use? The link you gave indicated that Firefox 3+ should use that plugin. Is there a cache somewhere I need to update for Firefox to recognize that I have a symlink to the Java plugin?

RogueProgrammer1

  • Member
  • *
  • Posts: 6
Re: Firefox/Java problems
« Reply #3 on: January 02, 2013, 09:12:44 am »
Edit: I didn't create exactly the same symlink you specified. Since I installed the JDK, I used /usr/lib/java/jre/lib/i386/libnpjp2.so.

bigpaws

  • Vectorian
  • ****
  • Posts: 1868
Re: Firefox/Java problems
« Reply #4 on: January 02, 2013, 10:12:48 am »
You mentioned the path of /usr/lib/java/jre/../../../libnpjp2.so

Shouldn't it be /usr/lib/java/jdk/../../../libnpjp2.so ?

From the Oracle docs:

http://docs.oracle.com/javase/7/docs/webnotes/install/linux/linux-plugin-install.html

HTH

Bigpaws

MarkGrieveson

  • Vectorian
  • ****
  • Posts: 531
Re: Firefox/Java problems
« Reply #5 on: January 02, 2013, 01:19:12 pm »
I have jre version 7u7-i586-3vl70 installed, and Firefox complains of this on my computer too, stating:  "An important update is available for Java(TM) Plug-in 1.7.0_07."  This message is given to me via the Add-ons Manager.  So, java is disabled currently.  It invites me to "Update Now".  I prefer to rely on packages from Gslapt, though.
I am using VL7.0 standard with XFCE

RogueProgrammer1

  • Member
  • *
  • Posts: 6
Re: Firefox/Java problems
« Reply #6 on: January 02, 2013, 01:41:39 pm »
You mentioned the path of /usr/lib/java/jre/../../../libnpjp2.so

Shouldn't it be /usr/lib/java/jdk/../../../libnpjp2.so ?

From the Oracle docs:

http://docs.oracle.com/javase/7/docs/webnotes/install/linux/linux-plugin-install.html

HTH

Bigpaws

I have a symbolic link between where I have Java installed (/usr/lib/jdk1.7.0_10/) and /usr/lib/java, and java commands in the terminal seem to have no problem with that. Making the symbolic link to the original though (/usr/lib/jdk1.7.0_10/jre/lib/i386/libnpjp2.so) allowed Firefox to recognize the plug in. Is there something in VectorLinux about not allowing a symbolic link to a symbolic link? Is there a way around that? I got it working, so it doesn't matter much to me, but I am curious.

Thanks for your help. I never would've stumbled across the solution if you hadn't pointed that out.

hata_ph

  • Packager
  • Vectorian
  • ****
  • Posts: 3261
  • -- Just being myself --
Re: Firefox/Java problems
« Reply #7 on: January 02, 2013, 07:24:41 pm »
I will build jre-7u10 soon...once it is in the testing repo you can try to use it...

RogueProgrammer1

  • Member
  • *
  • Posts: 6
Re: Firefox/Java problems
« Reply #8 on: January 04, 2013, 08:41:28 am »
I will build jre-7u10 soon...once it is in the testing repo you can try to use it...
What are you doing to build it exactly?

retired1af

  • Packager
  • Vectorian
  • ****
  • Posts: 1283
Re: Firefox/Java problems
« Reply #9 on: January 04, 2013, 10:39:23 am »
Essentially, he's making a repo package that you'll be able to install using gslapt.
ASUS K73 Intel i3 Dual Core 2.3GHz

hata_ph

  • Packager
  • Vectorian
  • ****
  • Posts: 3261
  • -- Just being myself --
Re: Firefox/Java problems
« Reply #10 on: January 04, 2013, 08:30:58 pm »
jre-7u10 should be in the testing repo...make sure http://vectorlinux.osuosl.org/veclinux-7.0/testing/ is in your gslapt repo list and search for it

MarkGrieveson

  • Vectorian
  • ****
  • Posts: 531
Re: Firefox/Java problems
« Reply #11 on: January 05, 2013, 08:43:09 am »
Enabled testing, installed, then disabled testing.  Works perfectly.  Thanks.
I am using VL7.0 standard with XFCE