Window configuration JAVA environment

download JAVA

Official website address

image.png

After downloading and installing, remember to turn off automatic updates after installation

Configure environment variables

Configure the JAVA_HOME variable

image.png

Create a new one in system variables

JAVA_HOME
复制代码

Variable, the value is the path of jdk in the JAVA installation path

image.png

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

image.png

Modify the Path variable

Edit the variable in the system Pathvariable and append the following configuration

%JAVA_HOME%\bin
%JAVA_HOME%\jre\bin
复制代码

image.png

Verify configuration

javac
复制代码

image.png

Guess you like

Origin juejin.im/post/7104565079772921886