Configure environment variables in Java/JDK

Source: Internet
Author: User

Of course it is not original. The configuration idea belongs to the Windows operating system and JDK.

My computer-properties-advanced-Environment Variables

1. Create a variable named java_home with the value: C: \ Program Files \ Java \ jdk1.7.0 _ 01 (JDK installation directory)

2. Create a new variable named classpath with the value:.; % java_home % \ Lib \ DT. jar; % java_home % \ Lib \ tools. Jar (note that no punctuation marks can be missed)

3. Modify the PATH value by adding % java_home % \ bin at the beginning;

In this way, you can use Java commands in any directory.

Verify that the environment variables have been configured.

Run cmd to open the system command line. Enter javac. If you can return the usage of javac, the environment variable has been configured. If the command cannot be found, the configuration is incorrect.

Word Literacy:

JDK (Java Development Kit): Java development environment. If you want to develop Java, install it. JDK automatically includes JRE

JRE (Java runtime envrionment): Java Runtime Environment. If you only run Java without development, you only need to install JRE.

Reference: http://www.cnblogs.com/xryyforver/archive/2007/11/28/1508873.html 2011.12.8

2012.3.2 supplement

System environment variables and user environment variables. The actual environment variables are generally the superposition of system variables and user variables, or the user variables may overwrite the system variables. You can enter set in the CMD command line to view environment variables.

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.