Configure Java environment variables in win7

Source: Internet
Author: User

I recently learned about Android development and encountered some problems when I first configured the Java environment. Now I want to share my configuration process:

1. Choose computer> Properties> advanced system Settings> advanced> environment variables.


2. System variable-> New-> variable name: java_home variable value: C: \ Program Files \ Java \ jdk1.7.0 (this is only the installation path of my JDK)
3. Add % java_home % \ bin at the beginning of the variable name path. (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)
4. Modify the value of the classpath variable:
Add % java_home % \ Lib; % java_home % \ Lib \ DT. jar; % java_home % \ Lib \ tools. jar;

Finally, test whether the environment variables are set successfully.
In the lower-left search box, type
CMD press ENTER
Enter javac
If the following


This indicates that the Java environment variable is successfully configured!


If

'Javac' is not an internal or external command or can be run.ProgramOr batch files.

This error indicates that the Java environment variable configuration has failed. Check it carefully!

Related Article

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.