JAVA environment variable configuration (WIN10)

Java environment variable configuration under Win10

Click on the "Environment Variables" option below

Next is the specific configuration process:

Click the "New" option under "System Variables"
insert image description here

Fill in "Java_Home" in "Variable Name" and
"Variable Value" is the JDK installation path

C:\Program Files\Java\jdk1.8.0_301

insert image description here
Click the "OK" option
and find "Path" in "System Variables"
insert image description here

Select "Path" and click "Edit" option
to copy all the quotes "%Java_Home%\bin;%Java_Home%\jre\bin;", to the front of the "Variable Value" column, "OK" [Note] If there is
no The editing interface as shown in the figure below appears, please select "Edit Text" on the right
insert image description here
in the "System Variables" column, "New", "Variable Name" is "CLASSPATH", and "Variable Value" is ".;%Java_Home%\bin;% Java_Home%\lib\dt.jar;%Java_Home%\lib\tools.jar", "OK",
insert image description here
click the "OK" option at the bottom of "Environment Variables"
to return to the computer desktop, press the shortcut key "Win+R", enter "cmd"
checks whether the Java environment is configured successfully
Enter "java"
insert image description here

Type "javac"
insert image description here

Enter "java -version"
insert image description hereand if the above three commands are successfully executed and the above interface appears, then the configuration is complete

Guess you like

Origin blog.csdn.net/weixin_44374025/article/details/123778072