编程语言
首页 > 编程语言> > 部署java环境

部署java环境

作者:互联网

1解压

[root@nfs_Repo ~]#tar xf jdk-8u181-linux-x64.tar.gz

2创建软连接
[root@nfs_Repo ~/jdk1.8.0_181/bin]#ln -s /root/jdk1.8.0_181/bin/java /usr/bin/java

3#配置环境变量
[root@nfs_Repo ~/jdk1.8.0_181/bin]#vim /etc/profile
#java
export JAVA_HOME=/root/jdk1.8.0_181
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib

[root@nfs_Repo ~/jdk1.8.0_181/bin]#source /etc/profile

4#查看版本
[root@nfs_Repo ~/jdk1.8.0_181/bin]#java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)

标签:bin,jdk1.8,java,部署,环境,Repo,181,nfs,root
来源: https://www.cnblogs.com/tyjs09/p/15894196.html