linux安装java1.8

linux安装java1.8

网盘下载包
jdk-8u201-linux-x64.tar.gz
链接:https://pan.baidu.com/s/1A5vM5kitMbxQrZ0GUEuIWg
提取码:dpf1

mv jdk-8u201-linux-x64.tar.gz /usr/local/jdk-8u201-linux-x64.tar.gz

tar -zxf jdk-8u201-linux-x64.tar.gz

mv jdk1.8.0_201 java

vi /etc/profile

	set java environment
	JAVA_HOME=/usr/local/java       
	JRE_HOME=/usr/local/java/jre       
	CLASS_PATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
	PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
	export JAVA_HOME JRE_HOME CLASS_PATH PATH

source /etc/profile

java -version
	
	java version "1.8.0_201"
	Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
	Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)

安装完毕!

你可能感兴趣的:(Linux,Java)