A download of Java JDK and configure the environment variables

1. Download JDK address  https://www.oracle.com/technetwork/java/javase/downloads/index.html

 

2. Click to download

3. I installed JDK installation directory is C: \ tool \ Java \ jdk-12.0.2

4. Set Environment Variables

(1) find the System Settings => Advanced Settings

(2) Advanced => Environment Variables => User Environment Variables => New

(3) set three new user variables (not new, there are edit)

JAVA_HOME      C:\tool\Java\jdk-12.0.2

CLASSPATH      .;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;

Paht      % JAVA_HOME% \ bin

 

 

 

 

 

5. Check whether the JDK installation is successful, the environment variable is set correctly

(1) win + R => CMD input

(2) Enter java -version, java, javac three correct order shall be shown in FIG. 

 

 

Guess you like

Origin www.cnblogs.com/zhyue/p/11458552.html