Install SUN/Oracle JDK on CentOS or Fedora

1. Download SUN or now Oracle JDK (.rpm.bin format) from Oracle Website: http://www.oracle.com/technetwork/java/javase/downloads/index.html

2. make .bin file executeable

chmod +x <file>.rpm.bin

3. run the installer

./<file>.rpm.bin

4. link the installed jdk into your environment

alternatives --install /usr/bin/java java /usr/java/default/bin/java 1
alternatives --config java

5. test

java -version

output should look like this:

java version “1.5.0_19”

Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_19-b02)

Java HotSpot(TM) Client VM (build 1.5.0_19-b02, mixed mode, sharing)

 

More informations: http://wiki.centos.org/HowTos/JavaOnCentOS

Leave a Reply

Your email address will not be published. Required fields are marked *