Windows installs jdk and configures environment variables

1. Download jdk
to Oracle official website to download jdk Java Downloads | Oracle
select Windows --> x64 installer to download

 2. Install jdk,
the next step is the next step,
you can change the path (mine is D:\Java\jdk17)

3. Configure environment variables
(1) Settings - System - System Information - Advanced System Settings
(2) Click New in the middle of the system variable,
        enter JAVA_HOME in the variable name, and enter the absolute path in the variable value (mine is D:\Java \jdk17)

(3) Click New in the middle of the system variable,
        enter the CLASSPATH variable value in the variable name, and enter
.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;

(4) Modify the system variable Path variable in

%JAVA_HOME%\bin
%JAVA_HOME%\jre\bin


 

 4. Verify whether the configuration is successful
(1) Open cmd (win+r)
and enter java

type javac

Guess you like

Origin blog.csdn.net/FourthBro/article/details/131765910