1. Download jdk8
https://www.oracle.com/java/technologies/downloads/#java8-windows
Baidu Netdisk:
Link: https://pan.baidu.com/s/1qtVZ3Rsa1_n9XsFcXj07rA Extraction code: yhwc
2. Double-click to install JDK
Before the operation, save the java folder on the D drive, and create a jdk1.8.0_241 folder and a jre1.8.0_241 folder in it to ensure that they are all together
(1) Click Next
(2) JDK to modify the downloaded directory D:\java\ jdk1.8.0_241
(3) Jre modifies the downloaded directory D:\java\jre1.8.0_241
(4) The installation is successful
3. Build the environment
(1) Right-click the properties of this computer
(2) Click Advanced System Settings
(3) Click Environment Variables
(4) Create a new JAVA_HOME (representing your JDK installation path) D:\java\jdk1.8.0_241
(5) Create a new CLASSPATH .;%JAVA_HOME%\lib;
(6) Edit Path and add %JAVA_HOME%\bin to the back
(7) Keep clicking OK to close the pop-up window
4. Check whether the installation is successful
(1) WINDOWS+R key, enter cmd to enter the command line interface
(2) Check the version
Enter the java -version command, and the following prompt will appear, and you can see the JDK version you installed.
(3) Enter the javac command and the following prompt will appear: the installation is successful