1. Download the binary
wget
http://download.oracle.com/otn-pub/java/jdk/6u38-b05/jre-6u38-linux-x64.bin
2. Run the binary via SHELL to install it.
chmod
+x jre-6u38-linux-x64.bin
./jre-6u38-linux-x64.bin
This
will create a directory of name 'jre1.6.0_38' Move this directory to /usr/java
3. Verify the installation
cd
/usr/java/jre1.6.0_38/
./java
-version
java
version "1.6.0_38"
Java(TM)
SE Runtime Environment (build 1.6.0_38-b05)
Java
HotSpot(TM) 64-Bit Server VM (build 20.13-b02, mixed mode)
4. Configure the new upgraded java environment
/usr/sbin/alternatives
--install /usr/bin/java java /usr/java/jre1.6.0_38/bin/java 1
'1'
indicates the priority
/usr/sbin/alternatives
--config java
There
are 3 programs which provide 'java'.
Selection Command
-----------------------------------------------
*+
1
/usr/lib/jvm/jre-1.4.2-gcj/bin/java
2 /usr/java/jre1.6.0_38/bin/java
Enter
to keep the current selection[+], or type selection number: 2
5. Verify the environment
java
-version
java
version "1.6.0_38"
Java(TM)
SE Runtime Environment (build 1.6.0_38-b05)
Java
HotSpot(TM) 64-Bit Server VM (build 20.13-b02, mixed mode)