Step 1: First, look at the effect after the configuration is successful
Click the WIN key -> Run (or use win+r)
Enter cmd command and enter java -version
After the configuration is successful, the version information java version "1.8.0_65" will appear
Step 2: Download and unzip to E:/JDK
The correct directory is E:/JDK
Do not copy to the e:/jdk/jdk directory and pay attention to the directory structure.
Step 3: Environment variable configuration
Right-click My Computer ->Properties ->Advanced ->Environment Variables ->System Variables Note: It is the system variable below, not the new variable name of the user variable above, and the variable value E:/JDK
Modify the variable Path and add %JAVA_HOME%/bin to the front;
Note: "Path" is capitalized in the first letter, do not change it to "PATH" bin with a semicolon after it;
Step 4: Verify that the configuration is successful
Click Confirm to close the configuration page just now. This step must be done, otherwise the configuration just now will not take effect.
Click the WIN key -> Run (or use win+r)
Enter cmd command and enter java -version
If the version information appears, it indicates that the configuration is successful. If it fails, adjust the previous configuration and restart the cmd command instead of entering java -version into the original cmd