[0]
Go to the Oracle downloads page. The current link is
http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u27-download-440405.html.
Choose jdk-6u27-linux-i586.bin (say) to download.
[1]
On console (password should be set where required):
[prompt] sudo mkdir /opt/java/
[prompt] sudo cp /home/<where_downloaded>/jdk-6u27-linux-i586.bin /opt/java/jdk-6u27-linux-i586.bin
[prompt] cd /opt/java
[2]
[prompt] sudo chmod a+x jdk-6u27-linux-i586.bin
[prompt] sudo ./jdk-6u27-linux-i586.bin
Unpacking...
Checksumming...
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).
creating: jdk1.6.0_27/
Checksumming...
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).
creating: jdk1.6.0_27/
... ... ...
Press Enter to continue.....
Done.
Done.
[3]
At the end of the file bash.bashrc put the following instructions.
export JAVA_HOME=/opt/java/jdk1.6.0_27
export PATH=$JAVA_HOME/bin:$PATH
[4]
Open a new console and run the command:
[prompt] java -version
to which the following result is expected:
java version "1.6.0_27"
Java (TM) SE Runtime Environment (build 1.6.0_27-b07)
Java HotSpot (TM) Server VM (build 20.2-b06, mixed mode)
No comments:
Post a Comment