How to configure environment variables for Java in win7 and 1.6jdk in Environment Variables]

Source: Internet
Author: User

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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.