JAVA basics/Lesson 1: Teach you how to configure JDK environment variables and jdk Environment Variables
It consists of three steps: Download, configuration, and verification to explain how to configure JDK environment variables.
Jdk.rar direct (copy to address bar): http://how2j.cn/frontdownload? Bean. IDS = 249
Step 1:
First, check the effect after successful configuration.
Click WIN key-> Run (or use win + r)
Enter the cmd command
Input java-version Note:-version is in lower case and cannot be in upper case. There is a space behind java
After the configuration is successful, java version "1.8.0 _ 65" is displayed"
Note: This is the effect after the configuration is complete. This effect cannot be seen before the configuration is complete.
Step 2:
Download and decompress the package to E:/JDK.
Download jdk.rar in the upper right corner first, and decompress it.
The correct directory is E:/JDK
Do not copy to the e:/jdk directory.
Note the directory structure
Step 3:
Environment variable configuration
Right-click my computer and choose Properties> advanced> environment variables> system variables.
Note: It is the following system variable, not the above user variable
Create a variable named JAVA_HOME with the variable value E: \ JDK
Modify the variable Path and add % JAVA_HOME % \ bin at the beginning;
Note: "Path" is an uppercase letter. Do not change it to "PATH" bin followed by a semicolon;
Note: Do not remove these two user variables in the system variables to avoid interference.
Note: The PATH configuration varies in Win10. Follow these steps to configure the Path of the environment variable in Win10.
Step 4:
Configure the environment variable Path in Win10
, Add one, and put it at the top.
Step 5:
Verify whether the configuration is successful
Click "OK" to close the configuration page. This step must be done. Otherwise, the configuration just now cannot take effect.
Click WIN key-> Run (or use win + r)
Enter the cmd command
Enter java-version
If version information is displayed, the configuration is successful.
If it fails, adjust the previous configuration and restart the cmd command instead of entering java-version in the original cmd.