How to configure jdk environment variables

 

1. Install JDK. Select the installation directory. During the installation process, two installation prompts will appear. The first time is to install jdk, and the second time to install jre. It is recommended to install both in different folders in the same java folder. It cannot be installed in the root directory of the java folder. Installing jdk and jre in the same folder will cause an error.

 

 

 

2. Install jdk and choose the directory at will. Just modify the directory before the default installation directory java. Install jre→change→java. The previous directory is the same as the jdk directory. Note: If there is no installation directory requirement, you can set it by default. No changes are required, just click Next twice.

 

 

 

 

 

 

3. After installing the JDK computer, configure environment variables → properties → advanced system settings → advanced → environment variables

 

 

 

4. System variables → new JAVA_HOME variable. Fill in the variable value into the jdk installation directory

5. System Variables→Find Path Variables→Edit

Enter %JAVA_HOME%in;%JAVA_HOME%jrein; at the end of the variable value (note whether there is a; at the end of the variable value of the original Path, if not, enter the; first and then enter the above code)

 

 

 

6. System variables → new CLASSPATH variable

Fill in the variable value. ;%JAVA_HOME%lib;%JAVA_HOME%lib ools.jar (please note that there is a dot in front) system variables are configured

 

 

 

7. Verify that the configuration is successful. Run cmd and enter java -version (there is a space between java and -version)

If the version information is displayed, the installation and configuration are successful.

 

 

 

 

 

Posted 29 minutes ago

Guess you like

Origin blog.csdn.net/u010608296/article/details/113059991