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

CentOS7.6 install jdk1.8

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

1. Log in to the Oracle official website to download the jdk version, and download the corresponding version according to your own needs. Take the jdk1.8.0_231 version as an example.

Oracle official website: https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

2. Log in to the Linux server and import the jdk into the server through the rz command

If there is no rz command, you need to install lrzsz first.

Yum install lrzsz-y

3. Extract the jdk package to the specified path-C specified path

4. Configure environment variables

Edit / etc/profile file at the end with the following content wq save exit

The source / etc/profile file makes the configuration file effective

Export JAVA_HOME=/usr/local/jdk1.8.0_231

Export JRE_HOME=/usr/local/jdk1.8.0_231/jre

Export CLASS_PATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib

Export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin

5. Verify that the installation is successful

Enter java-version if the following indicates that the installation is successful

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