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 configure JAVA environment variables in centos subsystem

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

In this issue, the editor will bring you about how to configure JAVA environment variables in the centos subsystem. The article is rich in content and analyzes and describes for you from a professional point of view. I hope you can get something after reading this article.

1. Download java to local

two。 Soft connect to the directory where jdk is located

Ln-s / mnt/h/ CVM Building CVM

3. Copy jdk to the home path

Build cp / home/ CVM / jdk-8u211-linux-x64.tar.gz / home/

4. Decompression

Tar-zxvf jdk-8u211-linux-x64.tar.gz

5. Cut the extracted folder to the usr/local/jdk1.8 directory

Mv jdk1.8.0_211 / usr/local/jdk1.8/

6. Configure environment variables

Vim / .bashrc

Add at the end of the open file:

Export JAVA_HOME=/usr/local/jdk1.8export PATH=$JAVA_HOME/bin:$PATHexport CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

7. Make the configuration effective

Source / .bashrc

8. Verify that the environment variable is configured successfully

Java-version

Java version "1.8.0,211"

Java (TM) SE Runtime Environment (build 1.8.0_211-b12)

Java HotSpot (TM) 64-Bit Server VM (build 25.211-b12, mixed mode)

This is how to configure JAVA environment variables in the centos subsystem shared by the editor. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

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

Internet Technology

Wechat

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

12
Report