text:
(1) Computer → Properties → Advanced System Settings → Advanced → Environment Variables
The above is the win7, win10 Desktop is not computer icon, win10 is this computer → Computer → System Properties → About → Information System → Advanced System Settings → Advanced → Environment Variables
(2) a new system variable JAVA_HOME variable →
Jdk installation directory fill in variable values of (I E: \ Java \ jdk1.7.0), can not remember the view (run, pulled to the bottom can be seen) in cmd run java -verbose command
(3) System variables Path variable → Edit → Looking
In the last input variable value% JAVA_HOME% \ bin;% JAVA_HOME% \ jre \ bin; (note that the original value of the variable Path end there; number, if not, the first input; number enter the code above)
(4) New system variable CLASSPATH variable →
Fill in the value of the variable;.% JAVA_HOME% \ lib;% JAVA_HOME% \ lib \ tools.jar (Note that the preceding bit)
(5) Verify that the configuration is successful
Run cmd Enter java -version, the version information is displayed instructions to install and configure successfully.
Reference blog:
JDK installation and configuration environment variable _ Baidu experience
https://jingyan.baidu.com/article/6dad5075d1dc40a123e36ea3.html?qq-pf-to=pcqq.c2c