Friday, August 26, 2011

JDK Installations & Configuration on Linux

1.             Download JDK installer from below link.

http://www.oracle.com/technetwork/java/javase/downloads/index.html

2.             Change installation location.

# cd /usr/java

3.             Run jdk installer.
               
# ./jdk-6u26-linux-i586.bin

Press Enter to continue.....

4.             Export jdk installation path.

# export JAVA_HOME=/usr/java/jdk1.6.0_26

5.             Check path.

# echo $PATH

6.             Again export JAVA_HOME with old path.

# export PATH=$JAVA_HOME/bin:$PATH

7.             Check java version.

# java -version

8.             Set JAVA_HOME path permanently.

Modify /etc/profile and append path as below:
          export JAVA_HOME=/usr/java/jdk1.6.0_26
          export PATH=$JAVA_HOME/bin:$PATH

No comments:

Post a Comment