Strictly Programming

Install Java JDK 5 in Centos 5.0

Posted in Centos by sqllyw on 12/09/2008


First login as non root user, download this file from sun.com:
jdk-1_5_0_17-linux-i586-rpm.bin

chmod a+x jdk-1_5_0_17-linux-i586-rpm.bin

su root

./jdk-1_5_0_17-linux-i586-rpm.bin

after the installation, you will find /usr/java/jdk1.5.0_17

update the /etc/profile, add following lines:

JAVA=""
export JAVA="sun"
export JPATH="/usr/java/jdk1.5.0_17"
export JAVA_HOME="$JPATH"
export CLASSPATH="$PATH/bin"
pathmunge $JPATH/bin before

just befolow the following line

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTR

restart the computer, then:
java -version

result:

java version “1.5.0_17”
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_17-b04)
Java HotSpot(TM) Client VM (build 1.5.0_17-b04, mixed mode, sharing)

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: