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 build jdk1.8 on linux system

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

Share

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

This article mainly introduces "how to build jdk1.8 on the linux system". In the daily operation, I believe many people have doubts about how to build jdk1.8 on the linux system. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "how to build jdk1.8 on the linux system". Next, please follow the editor to study!

Xshell6 Quick download, xftp6 Quick download warm Tip: xshell is responsible for writing and executing Linux commands, which is the well-known command line. Xftp is responsible for uploading and downloading files. The two software are used together. There is also a free domestic linux remote connection client-finalshell, a software that integrates the functions of both xshell and xftp. Finalshell download address the owner of the building has been using this software.

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. Back to root users

Second, check whether the Linux system has its own jdk: 1, input: java-version 2, found 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). Then enter the corresponding file in the terminal to create a new folder containing the jdk package, 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: https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html on the official website

The landlord attached the downloaded JDK8 version. This article is the Linux x64 version.

JDK8 (Linux+x64) download address: jdk8 download address

6. After downloading, use the FileZilla file transmitter to transfer the jdk installation package to the corresponding folder of the virtual machine, or 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 process.

8. There are two ways to edit the configuration file and configure the environment variables: method 1: open the file to modify it, enter: mousepad / etc/profile and then modify it directly on the text. It is recommended to use this method.

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 x does not work

9. Reload the configuration file, enter: source / etc/profile

10. The last step is to check the installation. 1. Enter: java-version

2. Input: javac

3. Input: java

At this point, Linux installation of jdk is complete! In general, if the local computer is not convenient to install the Linux system environment, it is recommended to choose the Linux system on the CVM to build and practice the development environment (familiar with online environment). In China, Ali Cloud and Tencent Cloud are generally selected.

At this point, the study on "how to build jdk1.8 on the linux system" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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