(1) We need to configure three environment variables, namely Java_home , CLASSPATH , Path
(2) variable name input:java_home, variable value input:D:\Java\jdk1.8.0_05 Click OK.
It is important to note that the value entered by the variable value is the installation directory of your jdk , for example, my jdk is Java installed on the D drive. jdk1.8.0_05 inside the folder, my variable value is D:\Java\jdk1.8.0_05
(3) then click the New button, variable name input:CLASSPATH Variable Value input:.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar Click OK.
Special Note: When configuring CLASSPATH , the variable value is .; plus the percent sign behind, don't forget to have .; !
(4) Note:1. If you already have Path variables can be found Path , double-click Path , then add the following value (at the end of the original value if there is no ; You have to add it yourself . ; and then add the following value).
2. If you do not have a path variable, click the New button and enter it by the value below. variable name input:path variable value input:%java_home%\bin;%java_home%\jre\bin Click OK.
(5) test whether the JDK development environment is successfully built
Enter java-version in CMD to see if there is any configuration information, and if so, the configuration is successful!
How to configure the JDK development environment