First, the Environment preparation
Windows10
jdk1.8.0_144
Second, download and install the JDK
Download Password: R5ym
Three, environment variable configuration
First, open Control Panel > System and Security > System, click Advanced System settings to enter System properties.
Click Environment variables to enter environment variable settings.
Click the New button under System variables to add a system variable (variable name: Java_home variable value for JDK installation directory)
Set the PATH environment variable that already exists, so select path in the list, click the Edit button below (or double-click), and add the following information in the popup window:%java_home%\bin and%java_home%\jre\bin, then click "Confirm" button.
Create a new environment variable (variable name: Classpath variable Value:%java_home%\lib\dt.jar;%java_home%\lib\tools.jar)
Once the environment variable is configured, you can run java-version in cmd to check if Java is installed correctly
If the Java version and JVM version information is correctly printed, the Java installation is correct.
Windows system JDK environment variable configuration