1、下载JDK
JDK产商 | 下载地址 |
---|---|
Oracle JDK | 最新版本 、 历史版本 |
OpenJDK | 下载地址 |
Adoptium OpenJDK | 下载地址 |
Azul Zulu Builds of OpenJDK | 下载地址 |
Microsoft Build of OpenJDK | 下载地址 |
Amazon Corretto OpenJDK | 下载地址 |
Red Hat build of OpenJDK | 下载地址 |
2、安装JDK
2.1、安装OpenJDK
# Java Runtime Environment
yum install java-1.8.0-openjdk
# develop
yum install java-1.8.0-openjdk-devel
2.2、安装AdoptOpenJDK
解压安装
wget https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u362-b09/OpenJDK8U-jdk_x64_linux_hotspot_8u362b09.tar.gz
3、查看Java版本
Oracle JDK
$ java -version
java version "1.8.0_251"
Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode)
OpenJDK
java -version
openjdk version "1.8.0_262"
OpenJDK Runtime Environment (build 1.8.0_262-b10)
OpenJDK 64-Bit Server VM (build 25.262-b10, mixed mode)