Link to home
Start Free TrialLog in
Avatar of javagair
javagairFlag for United States of America

asked on

firefox on redhat linux needs to have java

I have java installed according to the server.
/usr/java/jre1.70_04/bin/java

but when I look in plugin on firefox it finds no java.

it appears from what I read on the web java should be in opt/java win some kind of link to a libnpjp2.so file in /usr/lib/Mozilla/plugins/

does anyone have a suggestion of how to get firefox to see the java installation?

thanks gary
Avatar of Mazdajai
Mazdajai
Flag of United States of America image

Yes, you can try to set a symbolic link from the java location to the plugins directory.

ln -s <JRE>/lib/i386/libnpjp2.so /usr/lib/mozilla/plugins/

Open in new window

Download the Java RPM from java.com to instal in /usr/java
sudo mkdir /usr/java

Open in new window

cd ~

Open in new window

chmod a+x jre<version>-rpm.bin

Open in new window

./jre-<version>-rpm.bin

Open in new window


Create a symbolic link in the Firefox plugins folder
cd ~/.mozilla

Open in new window

Check to see fi the plugins directory exists
ls

Open in new window


If not.....
mkdir plugins

Open in new window

cd plugins

Open in new window

ln -s /usr/java/jre<version>lib/<i386 or amd64 depends what you install>/libnpjp2.so

Open in new window


Launch Firefox and the Java plugin should be enabled.

Hopes this helps.
Avatar of javagair

ASKER

java is already installed and when I try to reinstall it says that I can not do this because it is already there.


when I do a search for   libnpjp2.so nothing comes up.  how can it not if java is already installed

gary
What files or directories are in the java location???
/usr/java/jre1.70_04/

To display information about the package

rpm -qi <package_name>

Open in new window


To list package files

 rpm -ql <package_name>

Open in new window

# rpm -ql icedtea-web
/usr/bin/itweb-settings.itweb
/usr/bin/javaws.itweb
/usr/lib64/IcedTeaPlugin.so
/usr/share/applications/itweb-settings.desktop

and java is in /usr/lib/jvm/* by default and not in /tmp like you installed.
This is working for me right now
11:21:26$ locate libnpjp2|xargs ls -l
-rwxr-xr-x 1 uucp  143 190998 Oct  8 23:59 /usr/lib/jdk1.7.0_45/jre/lib/i386/libnpjp2.so
lrwxrwxrwx 1 root root     34 Mar 10  2012 /usr/lib/mozilla/plugins/libnpjp2.so -> /usr/lib/java/lib/i386/libnpjp2.so
11:21:45$ ls -l /usr/lib/java
lrwxrwxrwx 1 root root 11 Nov  2 16:48 /usr/lib/java -> jdk1.7.0_45

Open in new window

If you have a 64-bit system, your paths may differ.
Having a symbolic link to another symbolic link lets me upgrade Java without having to update the plugins directory
Try

locate libnpjp2.so

Open in new window

my firefox (yum-installed 17-ESR) loads icedtea plugin just fine, but none of others. I suspect for security.....
Possibly Firefox has blocked build 04 because it's so old.

Build 45 was current the last time I checked... could be higher by now.
And Java 7u45 is the version shipped by CentOS and compatible with icedtea plugin...
By the way, for
$ locate libnpjp2.so
to work correctly, you may need to run
# updatedb
first.
on two Linux boxes,  located the libnpjp2.so file made the link like recommended. on the first one with firefox 13 it sees the file, but when you attempt to do anything on the browser the browser just closes.
on the second one with with firefox 17, made the links to the file, but firefox still says there is no java file even though the link is in the correct directory.
Even Firefox 17 is old - I have 26. Around about 17 I think Firefox went through a phase of not trusting Java at all. You do need a very recent Java for Firefox to accept it anyway as per http:#a39755355
Firefox will upgrade itself if you have it in a user-writable area (as I do) or (I expect) if you run it as root. Just click Help / About Firefox
Frefox 17.0.8 ESR is not that old. Like two versions before current 24.2.0 ESR
Neither matters for java support.
I've noticed significant improvements generally in Firefox 25 / 26 (not Java necessarily)
I dont see any 25 or 26 ever coming to enterprise linux....

https://www.mozilla.org/en-US/firefox/organizations/faq/
I believe 17 is the last version Linux compatible
my windows boxy has 25 on it.

gary
To get java vorking:
remove all the java plugins you dropped around filesystems

yum upgrade firefox (it becomes ESR 24.2.0, exactly like in worksforme scenario)
yum install java-1.7.0-openjdk icedtea-web

run firefox and check about:plugins

Ancestor of Firefox, mosaic, predates TCP/IP on Windows by couple of years, so you shoot here in wrong direction.
when I attempt to use yum it tells me this server uses classic RHN update and yum will not run.
how and where do I remove this reference to RHN update  so that yum will run?  

there has to be a file that is short circuiting yum someplace on this server.

thanks

gary
Try
# yum --disableplugins=rhnplugin [plus whatever commands you're trying to run]

The --disableplugins= parameter doesn't disable rhnplugin permanently; just for that run of yum.
For "will not run" you must post error messages. It takes time if it was long since you last updated the system.

Basically you log in to RHN, delete old system's definition and re-run rhn_register.
(Cough up some bucks if your subscription has expired)

(On the cheap end - it can be upgraded in-place to centos or oracle linux)
darr247
there is no such command as disableplugins listed for yum

gary
Well, it's not a "command" - it's an option (don't forget the double dash)... still, you're correct that I misspelt it (my bad!)... it's --disableplugin (no s on the end). Maybe I confused it with the --noplugins option, which disables ALL yum plugins for that run?

See the yum man page.

So, use
# yum --disableplugin=rhnplugin [plus whatever commands you're trying to run]
to temporarily disable the RHN Classic restriction.
disabling rhn plugin also removes all software repositories....
$ wget -P ~/Downloads http://javadl.sun.com/webapps/download/AutoDL?BundleId=83375

Open in new window

then
$ sudo yum --disableplugin=rhnplugin install ~/Downloads/jre-7u51-linux-x64.rpm

Open in new window

or, if your username isn't in /etc/sudoers,
$ su -c yum --disableplugin=rhnplugin install ~/Downloads/jre-7u51-linux-x64.rpm

Open in new window


OR, if you've already corrupted your system and must run as root all the time
# wget -P ~/Downloads http://javadl.sun.com/webapps/download/AutoDL?BundleId=83375

Open in new window

then
# yum --disableplugin=rhnplugin install ~/Downloads/jre-7u51-linux-x64.rpm

Open in new window

though I don't recommend installing ANYthing as the root user (because it eventually leads to having to run as root all the time).
when I do the wget:
resolves sun.com
connects
http request sent, awaiting response... 404 not found

actually do run as root, because I am the only one whoever goes near the server and it is only used to hold a series of images with only a connection to a as400 server.  Couldn't see the sense of logging in as a user in this circumstance.

a third party software vender needs to look at something on the server so I was trying to get a webex to open but no java
gary
Install java and plugin from CentOS
ASKER CERTIFIED SOLUTION
Avatar of Darr247
Darr247
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial