在linux下安装jdk环境

cd /home/kylin

 

下载jdk 
 wget https://edelivery.oracle.com/otn-pub/java/jdk/6u43-b01/jdk-6u43-linux-i586-rpm.bin
 
 cd /usr/local/
 
 cp /home/kylin/jdk-6u43-linux-i586-rpm.bin .
 
 chmod +x jdk-6u43-linux-i586-rpm.bin 
 ./jdk-6u43-linux-i586-rpm.bin 
 
 chmod  +x jdk-6u43-linux-i586.rpm 
 rpm -ivh jdk-6u43-linux-i586.rpm 
 vi /etc/profile

 

 
在profile 最下方增加如下参数
set java environment
JAVA_HOME=/usr/java/jdk1.6.0_43
CLASSPATH=.:$JAVA_HOME/lib/tools.jar
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME CLASSPATH PATH

 

 
保存退出 
执行 java-version
java version "1.6.0_43"
Java(TM) SE Runtime Environment (build 1.6.0_43-b01)
Java HotSpot(TM) Client VM (build 20.14-b01, mixed mode, sharing)
 
成功安装
posted @ 2013-03-31 18:32  jiang nan  阅读(254)  评论(0编辑  收藏  举报