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 ijdk environment variables in Linux system

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

Share

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

This article mainly introduces the Linux system how to configure ijdk environment variables, the article is very detailed, has a certain reference value, interested friends must read it!

Log in to the virtual machine and enter the terminal to switch to the root user, enter: su, then enter the password and then enter: cd. Go back to root user 2, check whether the Linux system has its own jdk:1, enter: java-version2, find input: rpm-qa | grep java detects the installation package of jdk, (note: remember to download an input: apt-get install + command name when the rpm command is not available) 3, and then delete the packages one by one Enter: rpm-e-nodeps + package name 4, and finally again: rpm-qa | grep java can check whether it has been deleted (this step has been uninstalled before, so there is no screenshot) 3. Then enter a new folder containing the jdk package in the corresponding file in the terminal, and enter: mkdir + directory name

4. Next, to modify the permissions of the folder, enter: chmod 777 + the name of the file to be deleted 5. Download the corresponding version of the installation package on the official website: https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html. 6. Use the FileZilla file transmitter to transfer the jdk installation package to the corresponding folder of the virtual machine. Or you can download it directly from Linux. 7. Enter the directory of the corresponding file at the terminal, further decompress it, and enter tar-zxvf + the name of the package to be decompressed. The following picture shows the decompression of Zhong 8. Edit the configuration file and configure the environment variables. There are two methods: method 1: open the file for modification. Input: mousepad / etc/profile directly modify the text after the suggestion to use this method 2: use vim / etc/profile to enter the editing state vim text editor profile global variable file Esc Shift+q into the keyboard editing Q! Do not save exit qw! Write and force exit, if keyboard x9 does not work, reload configuration file, enter: source / etc/profile

10. The last step is to check the installation. 1. Enter: java-version2, enter: javac3, enter: java

The above is all the content of the article "how to configure ijdk environment variables in Linux system". Thank you for reading! Hope to share the content to help you, more related knowledge, 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

Development

Wechat

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

12
Report