1. Right-click this computer -> Advanced System Properties -> Environment Variables
- Enter the variable name: JAVA_HOME
- Variable value: C: Program Files\Java\jdk1.8.0_271 (your JDK installation path)
2. Double-click path
- The first step is to enter %JAVA_HOME%\bin
- Step 2 click Move up to move to the top as shown in the picture
- Finally, make sure to save
Win + r type CMD
- Enter Java
- Input javac
If the configuration is displayed as shown in the figure, the configuration is successful and the Java god is one step closer.