Difference between revisions of "Configuring Java on Fedora/Centos"

From Klaus' wiki
Jump to: navigation, search
(Created page with 'This describes how to configure Sun's Java to run on Fedora (and probably also Centos). Download the latest java package from java.com <source lang="bash"> chmod a+x <path-to-p…')
 
 
(One intermediate revision by the same user not shown)
Line 29: Line 29:
  
 
Check your installation
 
Check your installation
 +
 
<source lang="bash">
 
<source lang="bash">
 
java -version
 
java -version
 +
</source>
 +
 +
As of Firefox 3.6.something another java plugin is necessary. Use the code below to install it ( or use the '''alternatives''' way shown above ).
 +
<source lang="bash">
 +
ln -s /usr/java/jre1.6.0_20/lib/i386/libnpjp2.so /usr/lib/mozilla/plugins/
 
</source>
 
</source>
  
 
Restart your browser and check the plugins.
 
Restart your browser and check the plugins.

Latest revision as of 06:47, 14 June 2010

This describes how to configure Sun's Java to run on Fedora (and probably also Centos).

Download the latest java package from java.com

chmod a+x <path-to-package>/jre<release>.bin
su -
cd /usr
mkdir java
cd java
<path-to-package>/jre<release>.bin
ln -s /usr/java/jre<release> /usr/java/latest
alternatives --install /usr/bin/java java /usr/java/latest/bin/java 100
alternatives --install /usr/bin/javac javac /usr/java/latest/bin/javac 100
alternatives --install /usr/bin/jar jar /usr/java/latest/bin/jar 100
alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so libjavaplugin.so /usr/java/latest/plugin/i386/ns7/libjavaplugin_oji.so 100
# Configure the following to reflect your newly installed Java.
alternatives --config java
alternatives --config jar
alternatives --config javac
alternatives --config libjavaplugin.so

In /etc/profile insert these two lines:

JAVA_HOME="/usr/java/latest"
export JAVA_HOME

Check your installation

java -version

As of Firefox 3.6.something another java plugin is necessary. Use the code below to install it ( or use the alternatives way shown above ).

ln -s /usr/java/jre1.6.0_20/lib/i386/libnpjp2.so /usr/lib/mozilla/plugins/

Restart your browser and check the plugins.