jdk环境配置
1.下载jdk
Java SE 8的官方网址是
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
2.解压文件
tar -xvf jdk-8u65-linux-x64.tar.gz
3.添加环境变量
vim /etc/profile
export JAVA_HOME=/home/software/jdk1.8.0_65 export JRE_HOME=/home/software/jdk1.8.0_65/jre export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
4.使环境变量生效
source /etc/profile
5.测试jdk是否成功
java -version