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 OpenJDK using yum in centos7

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article introduces how to use yum to install OpenJDK in centos7, the content is very detailed, interested friends can refer to, hope to be helpful to you.

1. Search for installation packages

[root@ticent admin] # yum search java | grep jdk

Ldapjdk-javadoc.noarch: Javadoc for ldapjdk

Java-1.6.0-openjdk.x86_64: OpenJDK Runtime Environment

Java-1.6.0-openjdk-demo.x86_64: OpenJDK Demos

Java-1.6.0-openjdk-devel.x86_64: OpenJDK Development Environment

Java-1.6.0-openjdk-javadoc.x86_64: OpenJDK API Documentation

Java-1.6.0-openjdk-src.x86_64: OpenJDK Source Bundle

Java-1.7.0-openjdk.x86_64: OpenJDK Runtime Environment

Java-1.7.0-openjdk-accessibility.x86_64: OpenJDK accessibility connector

Java-1.7.0-openjdk-demo.x86_64: OpenJDK Demos

Java-1.7.0-openjdk-devel.x86_64: OpenJDK Development Environment

Java-1.7.0-openjdk-headless.x86_64: The OpenJDK runtime environment without

Java-1.7.0-openjdk-javadoc.noarch: OpenJDK API Documentation

Java-1.7.0-openjdk-src.x86_64: OpenJDK Source Bundle

Java-1.8.0-openjdk.i686: OpenJDK Runtime Environment

Java-1.8.0-openjdk.x86_64: OpenJDK Runtime Environment

Java-1.8.0-openjdk-accessibility.x86_64: OpenJDK accessibility connector

Java-1.8.0-openjdk-accessibility-debug.x86_64: OpenJDK accessibility connector

Java-1.8.0-openjdk-debug.i686: OpenJDK Runtime Environment with full debug on

Java-1.8.0-openjdk-debug.x86_64: OpenJDK Runtime Environment with full debug on

Java-1.8.0-openjdk-demo.x86_64: OpenJDK Demos

Java-1.8.0-openjdk-demo-debug.x86_64: OpenJDK Demos with full debug on

Java-1.8.0-openjdk-devel.i686: OpenJDK Development Environment

Java-1.8.0-openjdk-devel.x86_64: OpenJDK Development Environment

Java-1.8.0-openjdk-devel-debug.i686: OpenJDK Development Environment with full

Java-1.8.0-openjdk-devel-debug.x86_64: OpenJDK Development Environment with

Java-1.8.0-openjdk-headless.i686: OpenJDK Runtime Environment

Java-1.8.0-openjdk-headless.x86_64: OpenJDK Runtime Environment

Java-1.8.0-openjdk-headless-debug.i686: OpenJDK Runtime Environment with full

Java-1.8.0-openjdk-headless-debug.x86_64: OpenJDK Runtime Environment with full

Java-1.8.0-openjdk-javadoc.noarch: OpenJDK API Documentation

Java-1.8.0-openjdk-javadoc-debug.noarch: OpenJDK API Documentation for packages

Java-1.8.0-openjdk-javadoc-zip.noarch: OpenJDK API Documentation compressed in

Java-1.8.0-openjdk-javadoc-zip-debug.noarch: OpenJDK API Documentation

Java-1.8.0-openjdk-src.x86_64: OpenJDK Source Bundle

Java-1.8.0-openjdk-src-debug.x86_64: OpenJDK Source Bundle for packages with

Ldapjdk.noarch: The Mozilla LDAP Java SDK

two。 Installation

[root@ticent admin] # yum install java-1.8.0-openjdk.x86_64

3. Add environment variable vi / etc/profile

JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-3.b12.el7_3.x86_64

JRE_HOME=$JAVA_HOME/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

4. Verify the validity

[root@ticent admin] # java-version

Openjdk version "1.8.0,131"

OpenJDK Runtime Environment (build 1.8.0_131-b12)

OpenJDK 64-Bit Server VM (build 25.131-b12, mixed mode)

On how to use yum in centos7 to install OpenJDK is shared here, I hope 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

Servers

Wechat

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

12
Report