One: Download and install the JDK first
(Official Download URL: http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html)
Second: Configure the environment variables and Class,path values
Find Right-click Properties to enter the page:
Click on "Advanced system Settings" to enter the page:
Click on "Environment variables", such as:
Click New, and then, as shown, set a variable name and variable value named "Java_home". (The value of the variable is where you install the JDK yourself, mine is: D\SOFTWAREINSTALLATION\JAVA\JDK)
Then click OK, and then find the name of the environment variable named path in the system variable name, as input:
C:\Program\Data\Oracle\Java\javapath; C:;%java_home%\bin;%java_home%jre\bin;\
Then click "OK", then create a new CLASSPATH environment variable and enter the following values:
.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar (preceded by a number and semicolon, followed by a semicolon) Finally, click on the confirmation in the window and then exit (to click on Confirm, then exit, otherwise the settings will be wasted)at this point, the Java environment variable is configured. Test it: Open the DOS console, type "Javac" if the following Chinese style appears, the environment variable configuration is successful.
Configuration of the Java environment variable under the WIN10 operating system