CentOS8 install jdk8 / java8 tutorial (recommended)

Foreword

At first, I wanted to use wget to download on CentOS8, then decompress it and configure environment variables, but after a long time I didn't do it well, so I gave up and installed it directly with yum.

1、 installation method

Use yum to install directly on CentOS8, and the environment variables are automatically configured

2、 Check if it is installed

See the following results, indicating that jdk has been installed and configured

[ root@localhost ~]# java -version
openjdk version "1.8.0_222"
OpenJDK Runtime Environment(build 1.8.0_222-b10)
OpenJDK 64-Bit Server VM(build 25.222-b10, mixed mode)

3、 Uninstall

Check whether the system comes with jdk

rpm -qa |grep java
rpm -qa |grep jdk
rpm -qa |grep gcj

If there is output information, the batch uninstall system comes with

rpm -qa | grep java | xargs rpm -e --nodeps

If you use the jdk installed by yum, please use the following command to uninstall

yum -y remove java-1.8.0-openjdk-headless.x86_64

4、 installation

4.1 Check if there is a java1.8 package in yum

yum list java-1.8*

4.2 start installation

yum install java-1.8.0-openjdk* -y

5、 verification

[ root@localhost ~]# java -version
openjdk version "1.8.0_222"
OpenJDK Runtime Environment(build 1.8.0_222-b10)
OpenJDK 64-Bit Server VM(build 25.222-b10, mixed mode)

to sum up

The above is the tutorial for installing jdk8 / java8 on CentOS8 introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message. The editor will reply to you in time. Thank you very much for your support to the ZaLou.Cn website!
If you think this article is helpful to you, welcome to reprint, please indicate the source, thank you!

Recommended Posts

CentOS8 install jdk8 / java8 tutorial (recommended)
CentOS 7 install JAVA environment (JDK 1.8)
Install Java JDK8 under CentOS6
5.1. CentOS@ install JDK1.8 graphic tutorial
Minimal install JDK 1.8 tutorial in CentOS 7
CentOS install jdk
CentOS 7 install Java 1.8
CentOS 7 install Java 1.8
Install Java on Centos 7
Centos install MYSQL8.X tutorial
Centos install elasticsearch tutorial
Linux Centos7 install jdk1.8
Centos7 install kubernetes tutorial
Centos7 install Mysql8 tutorial
CentOS7 install JDK8, tomcat8
ubuntu14.04 install jdk1.8 tutorial
Centos 7 install JDK (Linux install jdk)
CentOS6.5 install Java 8 and Tomcat8
Linux Centos7 install redis tutorial
Tencent Cloud Centos install jdk8
CentOS6.5 install Java 8 and Tomcat8
vmware install CentOS 7 detailed tutorial
CentOS6.5 install Java 8 and Tomcat8
CentOS 7 yum install PHP7.3 tutorial
Install Mesos tutorial under CentOS7
Centos 7 install jdk and package service service
How to install jdk1.8 on centOS7
Install JDK8 in rpm on CentOS7
Tencent Cloud Centos7 install java server
Tencent Cloud Centos7 install java server
Linux CentOS 7 install JDK detailed steps
Install java in yum mode in Centos
Centos7 uninstall openJdk, and install JDK1.8
1.5 Install Centos7
Graphical tutorial for installing JDK1.8 under CentOS7.4
Three ways to install JDK under CentOS
How to install offline JDK1.8 on centos7.0
Centos8 use yum to install rabbitmq tutorial
Centos6 install Python2.7.13
Centos7.3 install nginx
CentOS7.2 install Mysql5.7.13
CentOS install Redmine
Centos7 install Python 3.6.
CentOS7 install MySQL
Centos7 install protobuf
CentOS 7 install Docker
CentOS7 install GlusterFS
CentOS 7.4 install Zabbix 3.4
CentOS7 install Docker
Centos6.5 install Tomcat
CentOS install Python 3.6
Vmware install CentOS6
centos7 install docker-ce 18.01.0
CentOS 7.2 install MariaDB
CentOS 7 install Hadoop 3.0.0
Centos 7.6 install seleniu
CentOS 7.3 install Zabbix3
Centos7 install LAMP+PHPmyadmin
CentOS install mysql
CentOS install openjdk 1.8
CENTOS6.5 install CDH5.12.1 (1)