ubuntu16.04----jdk---install----config
1、下载jdk。
2、验证java是否安装,使用java -version命令,如下图所示说明没有安装:
3、在usr目录中创建一个jdk-8目录,如下图所示:
4、配置系统环境变量,编辑/etc/profile文件,在文件的末尾添加一下信息:
export JAVA_HOME=/usr/jdk1.8.0_101
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib:$JRE_HOME/lib
export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
export JAVA_HOME=/usr/jdk-8是配置jdk的主目录
export JRE_HOME=$JAVA_HOME/jre是配置jre的目录
export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib:$JRE_HOME/lib是配置的CLASSPATH目录
export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin将jdk的可执行文件目录添加到系统系统环境目录中
如下图所示:
6、使用source /etc/profile命令使刚才配置的信息生效,如下图所示:
7、再次使用java -version命令进行验证,如下图所示:
_________________________________________________________________________________________________________________________________________________
每一个不曾起舞的日子,都是对生命的辜负。
But it is the same with man as with the tree. The more he seeks to rise into the height and light, the more vigorously do his roots struggle earthward, downward, into the dark, the deep - into evil.
其实人跟树是一样的,越是向往高处的阳光,它的根就越要伸向黑暗的地底。----尼采
每一个不曾起舞的日子,都是对生命的辜负。
But it is the same with man as with the tree. The more he seeks to rise into the height and light, the more vigorously do his roots struggle earthward, downward, into the dark, the deep - into evil.
其实人跟树是一样的,越是向往高处的阳光,它的根就越要伸向黑暗的地底。----尼采

浙公网安备 33010602011771号