Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install jdk8/java8 with CentOS8

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article introduces you how to install jdk8/java8 on CentOS8, the content is very detailed, interested friends can refer to, hope to be helpful to you.

Preface

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

1. Installation method

Yum is installed directly on CentOS8, and the environment variables are automatically configured.

2. Check to see if it is installed

The following results indicate that jdk has been installed and configured

[root@localhost] # java-versionopenjdk 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 javarpm-qa | grep jdkrpm-qa | grep gcj

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

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

If you use the jdk installed by yum, uninstall it using the following command

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

4. Installation

4.1Check 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-versionopenjdk 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)

On how to install CentOS8 jdk8/java8 to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report