install java centos

May 12, 2011

How do I install java on centos?

Step 1: download the JDK or JRE from http://www.oracle.com/technetwork/java/javase/downloads/index.html

Step 2: chmod +x Step 3: Execute Package

Example:

[root@interweb tmp]# wget http://download.oracle.com/otn-pub/java/jdk/6u25-b06/jre-6u25-linux-x64-rpm.bin
[root@interweb tmp]# mv jre-6u25-linux-x64-rpm.bin\?e\=1305390057\&h\=b1bb96445e6d1965e1c566f5279a49f2 jre-6u25-linux-x64-rpm.bin
[root@interweb tmp]# chmod +x jre-6u25-linux-x64-rpm.bin
[root@interweb tmp]# ./jre-6u25-linux-x64-rpm.bin
Unpacking...
Checksumming...
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).
  inflating: jre-6u25-linux-amd64.rpm
Preparing...                ########################################### [100%]
   1:jre                    ########################################### [100%]
Unpacking JAR files...
        rt.jar...
        jsse.jar...
        charsets.jar...
        localedata.jar...
        plugin.jar...
        javaws.jar...
        deploy.jar...

Done.