Environment Windows 10, JDK, JRE1.8.0_102
Right-click the Windows icon in the lower left corner of the mouse and select the "System" item;
Click "Advanced System Settings" - "Environment Variables" to enter the configuration of system environment variables; + The values are: %JAVA_HOME%libdt.jar;%JAVA_HOME%libtools.jar. Baidu said that "." must be added before the percent sign, but I didn't add it and it still had no effect;
Create new ones in the Path variable: %JAVA_HOME%bin, %JAVA_HOME%jrebin. The advantage of Win10 is that you don’t need to add a semicolon, just copy and add;
Finally, right-click the Windows icon in the lower left corner, select the "Command Prompt" item, and enter java – version can query the currently installed java version information. Enter java and javac to test whether the environment variables are configured successfully. As shown below: