https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html  <官方JDK下载

之后放入文件夹解压.

解压命令是  tar zxvf jdk-8u121-linux-x64.tar.gz

配置java环境:

vim /etc/profile

[Linux] - Linux安装JDK_JVM

:x 保存并退出.

source /etc/profile 让环境变量立即生效

[Linux] - Linux安装JDK_Linux_02