1. 程式人生 > >linux下配置jdk

linux下配置jdk

root 5.1 port 下載 class cal time version profile

1.下載jdk.....tar.gz

2.解壓到 /usr/local/src

3.vim /etc/profile 添加下面的代碼

export JAVA_HOME=/usr/local/src/jdk1.8.0_181
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=$JAVA_HOME/lib/
export PATH=$PATH:$JAVA_HOME/bin

4.測試

[root@iZm5e1y15z8ms94adqia7hZ /]# 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)

linux下配置jdk