1. Install JDK

Oracle’s official website: www.oracle.com/cn/java/tec…

2. Configure environment variables

【 This computer 】→【 right-click 】→【 properties 】→【 Advanced system Settings 】

The variable name A variable’s value
JAVA_HOME JDK Installation Path
CLASSPATH .; %JAVA_HOME%\lib; %JAVA_HOME%\lib\dt.jar; %JAVA_HOME%\lib\tools.jar
path %JAVA_HOME%\bin

3. Check the Java environment

【win+R】 Open, enter CMD

Java # Check whether the Java environment is configured successfully. Javac # Check the Java versionCopy the code