1. Check the number of Linux bitsCheck whether Linux is 32-bit or 64-bit, which affects the version of JDK you need to download
Enter the command in Linux: If it is a 64-bit machine, it will output x86_64 2. Download JDKDownload address: https://www.oracle.com/technetwork/java/javase/downloads/jdk11-downloads-5066655.html Corresponding to step 1, download the 64-bit version of linx 3. Install JDKUpload the downloaded jdk to linux and unzip the compressed file 4. Set environment variablesModify the /etc/profile file vim /etc/profile, add the following content: export JAVA_HOME=/usr/local/jdk/jdk-11.0.6 #Change to the installation path of jdkexport CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export PATH=$JAVA_HOME/bin:$PATH source /etc/profile to make the environment variables effective 5. Test resultsEnter the command in Linux: [root@localhost local]# java -version java version "11.0.6" 2020-01-14 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.6+8-LTS) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.6+8-LTS, mixed mode) Seeing the above results, it means that jdk is installed successfully Summarize The above is the tutorial on how to install JDK in Linux and set environment variables introduced by the editor. I hope it will be helpful to everyone! You may also be interested in:
|
<<: MySQL calculates the number of days, months, and years between two dates
>>: Detailed tutorial on downloading mysql on Windows 10
question Question 1: How to solve the performance...
Table of contents Introduction Using Strict mode ...
<br />I have been working in front-end for s...
1. Concept Analysis 1: UE User Experience <br ...
Table of contents 1. Command 2. docker-compose.ym...
LocalStorage stores Boolean values Today, when I ...
Table of contents Written in front Precautions De...
<br />Related articles: 9 practical suggesti...
Use vue to simply implement a click flip effect f...
Table of contents String length: length charAt() ...
To implement the "Enter != Submit" probl...
Table of contents 1. Database Engine 1.1 View dat...
Preface <br />I have been working in the fro...
This question is very strange, so I will go strai...
Exporting Data Report an error SHOW VARIABLES LIK...