首页 > 代码库 > Centos linux java jdk 环境配置

Centos linux java jdk 环境配置

[root@localhost env]# cp -r /home/nescafe/temp/jdk1.8.0_121 /home/env
[root@localhost env]# vi /etc/profile

JAVA_HOME=/home/nescafe/temp/jdk1.8.0_121
CLASS_PATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME CLASS_PATH PATH

[root@localhost env]# source /etc/profile
[root@localhost env]# java -version

 

Centos linux java jdk 环境配置