download JAVA
After downloading and installing, remember to turn off automatic updates after installation
Configure environment variables
Configure the JAVA_HOME variable
Create a new one in system variables
JAVA_HOME
复制代码
Variable, the value is the path of jdk in the JAVA installation path
Configure the CLASSPATH variable
Create a new one in the system variable
CLASSPATH
复制代码
variable with value
.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;
复制代码
This paragraph is very important, not a single punctuation can be wrong
Modify the Path variable
Edit the variable in the system Path
variable and append the following configuration
%JAVA_HOME%\bin
%JAVA_HOME%\jre\bin
复制代码
Verify configuration
javac
复制代码