Configuring Java on Fedora/Centos

From Klaus' wiki
Revision as of 09:58, 4 June 2010 by Klaus (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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

Download the latest java package from

chmod a+x <path-to-package>/jre<release>.bin
su -
cd /usr
mkdir java
cd java
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/ /usr/java/latest/plugin/i386/ns7/ 100
# Configure the following to reflect your newly installed Java.
alternatives --config java
alternatives --config jar
alternatives --config javac
alternatives --config

In /etc/profile insert these two lines:

export JAVA_HOME

Check your installation

java -version

Restart your browser and check the plugins.