Liunx下安装jdk7

一、 查询系统中是否有安装过jdk;

#  rpm -qa | grep java

Liunx下安装jdk7

查询到有安装,使用命令卸载;

#  rpm -e --nodeps java-1.6.0-openjdk-1.6.0.0-1.41.1.10.4.el6.x86_64

#  rpm -e --nodeps tzdata-java-2011l-4.el6.noarch

Liunx下安装jdk7

二、 在oracle官网下载jdk

现在windows中下载好安装包;

在linux中新建目录;

#  mkdir /usr/local/java

Liunx下安装jdk7

将文件拷贝到新建的目录下并解压;

#   tar -zxvf jdk-7u67-linux-x64.tar.gz

Liunx下安装jdk7

设置profile文件;

#  vim /etc/profile

Liunx下安装jdk7

在文件末尾加上:

export JAVA_HOME=/usr/local/java/jdk1.7.0_67

export JRE_HOME=/usr/local/java/jdk1.7.0_67/jre

export PATH=$PATH:/usr/local/java/jdk1.7.0_67/bin

export CLASSPATH=./:/usr/local/java/jdk1.7.0_67/lib:/usr/local/java/jdk1.7.0_67/jre/lib

Liunx下安装jdk7

添加完,保存重启系统;

#reboot

重启完成后检查是否安装成功;

# java –version

Liunx下安装jdk7

上一篇:实现jQuery扩展总结


下一篇:基于 getter 和 setter 撸一个简易的MVVM