DK environment variable configuration method:
1. Right-click Computer & rarr; properties & rarr; Advanced System Settings & rarr; advanced & rarr; environment variables
2. System variable & rarr; New
Variable name: JAVA_HOME
Variable value: (enter the jdk installation directory for the variable value, for example, E: \ Java \ jdk1.7.0)
3. Find the Path variable in the system variable and select Edit
Enter % JAVA_HOME % \ bin; % JAVA_HOME % \ jre \ bin at the end of the variable value;
(Note: If the original Path variable value does not end
; Number, enter first; number and then enter the above code)
4. System variable & rarr; New
Variable name: CLASSPATH
Variable value:. % JAVA_HOME % \ lib; % JAVA_HOME % \ lib \ tools. jar (note the first one)
The system variables are configured.
5. Check whether jdk configuration is successful: run cmd and enter java-version (there is a space between java and-version)