2-JDK configuration and verification environment variables

background:

Official website to download, the default installation path, as shown below, there are two folders java directory: jdk and jre:

 

1. Computer -> right click -> Properties -> left of 'Advanced System Settings'

 

2. Advanced System Settings -> Advanced -> Select 'Environment Variables'

 

3. Configuration Variables

(1) Configuration JAVA_HOME

System Variables -> New -> variable name: JAVA_HOME -> variable value: C: \ Program Files \ Java \ jdk1.8.0_211 -> determine the absolute path (variable value of jdk not jre absolute path, such as the beginning of FIG.)

 

(2) Configuration CLASSPATH

System Variables -> New -> variable name: CLASSPATH -> variable value:% JAVA_HOME% \ lib;% JAVA_HOME% \ lib \ tools.jar -> OK.

 

(3) Path Configuration

System Variables -> Variable Path Select -> after the variable value is added;% JAVA_HOME% \ bin;% JAVA_HOME% \ jre \ bin -> OK

 

4. Verify that the configuration is successful

 Input cmd win + R 

(1) input Java (screenshot section omitted)

 

(2) Enter the javac (screenshot section omitted)

 

 (3) Input java -version

 

(1) - (3) shown above, it indicates that the configuration is successful jdk

Guess you like

Origin www.cnblogs.com/summer1019/p/11110730.html