Linux: JDK SE6 Installation

Using RPM archive:

mkdir /usr/local/java
cp jdk-6u21-linux-i586-rpm.bin /usr/local/java/jdk.bin
cd /usr/local/java
chmod +x jdk.bin
./jdk.bin
<agree with terms and conditions>
the package is installed into /usr/java
the command rpm -i is executed automatically uppon the .rpm file that is produced

How to link java on /usr/java/bin/java:

set Java Environment Variables:

$vi /etc/profile
export JAVA_HOME=/usr/java/jdk1.5.0_06
export PATH=$PATH:$JAVA_HOME/bin

test:

$java -version

Leave a Reply