[CentOS] Getting JRE working in Firefox

Fri Mar 7 15:28:16 UTC 2008
Ross S. W. Walker <rwalker at medallion.com>

Robert Moskowitz wrote:
> 
> I have installed both:
> 
> jdk-6u5-linux-i586-rpm.bin
> jre-6u5-linux-i586-rpm.bin
> 
> 
> But no Java plugin in Firefox.
> 
> I go to:  http://java.com/en/download/help/enable_browser.xml
> 
> And yes, Java is enabled but still get the dreaded 'download plugin'.
> 
> I seem to recall some magic linking needed, but my docs are in Freemind 
> that I can't get installed either.....

The secret is in 'alternatives', here is what I do in my kickstart
scripts (mind the wrap):

# Remove Sun added links
rm -f /usr/bin/javaws
rm -f /usr/bin/jcontrol

# Add Sun Java to alternatives
alternatives --install /usr/bin/java java /usr/java/default/bin/java 1000 --slave /usr/lib/jvm/jre jre /usr/java/default --slave /usr/bin/javaws javaws /usr/java/default/bin/javaws --slave /usr/bin/jcontrol jcontrol /usr/java/default/bin/jcontrol --slave /usr/bin/rmiregistry rmiregistry /usr/java/default/bin/rmiregistry

# Set Sun Java as the preferred Java environment
alternatives --set java /usr/java/default/bin/java

This should work even if you upgrade the Sun Java version.

-Ross

______________________________________________________________________
This e-mail, and any attachments thereto, is intended only for use by
the addressee(s) named herein and may contain legally privileged
and/or confidential information. If you are not the intended recipient
of this e-mail, you are hereby notified that any dissemination,
distribution or copying of this e-mail, and any attachments thereto,
is strictly prohibited. If you have received this e-mail in error,
please immediately notify the sender and permanently delete the
original and any copy or printout thereof.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3971 bytes
Desc: not available
URL: <http://lists.centos.org/pipermail/centos/attachments/20080307/9d0fa8f2/attachment-0005.bin>