JDK 1.6 of win7 System
Right-click "my computer"-> properties-> advanced-> environment variable system variable-> New-> variable name: java_home variable value: D: \ Program Files \ Java \ jdk1.6.0 _ 12 (this is only the installation path of my JDK)
System variable-> edit-> variable name: path is added at the beginning of the variable value: % java_home % \ bin; (if a path item already exists, you do not need to create a new one, add directly to the backend, but use it; separate it from the existing items)
System variable-> New-> variable name: classpath variable value :.; % java_home % \ Lib; % java_home % \ Lib \ DT. jar; % java_home % \ Lib \ tools. jar;
Finally, test whether the environment variables are successfully set. In the search box in the lower left corner, press CMD and press enter to enter javac. If the following information is displayed:
If the result appears after running! Congratulations! Your Java environment variable is successfully configured! If 'javac' is not an internal or external command, it cannot be run.ProgramOr batch files. This error indicates that the Java environment variable configuration has failed. Check it carefully!
========================================================== ======================================
Add QQ: 284651035 (this blogger) for help)
Weibo: http://weibo.com/cnbailu (Bai Lu)
Http://weibo.com/u/2717396075 (featured jokes)
Mr Chen Weibo: http://weibo.com/redarmychen Java direction
Miss Li Weibo: http://weibo.com/csdnliwei PHP direction
Mobile (mobile) Software Development Exchange Group: 57636364 (Please note that the application is on the csdn blog. Remember to change your business card after entering the group.) Thank you!