About Java environment variables and those jar packages

Source: Internet
Author: User

Everyone configures environment variables are generally

Java_home:c:\program Files (x86) \java\jdk1.6.0_30;

Path:%java_home%\bin;

CLASSPATH:.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar.

Explain:

Path points to the search command paths, and if you do not configure the path variable to point to the JDK, you will not be able to run Javac, Java and other commands at the command line.

Classpah points to the class search path,.; Indicates that in the current directory search, because Java programs are often used in the Lib directory under the Dt.jar and Tools.jar class, so these two also need to be added, if the command line compiled and run the program also need to use a third-party jar file, you also need to add a third-party jar file. Dt.jar and Tools.jar are not included in the Lib of the JRE.

Rt.jar is the Java base Class library (which contains the most commonly used java.*, javax.* packages, org.* packages), Dt.jar is about the runtime environment of the class library ( mainly swing package ), Tools.jar is the Tool class library ( including Javac,java,javap,javadoc and so on. JAVAP, the abbreviation for Java printer, is an anti-compilation tool that comes with the JDK.

About Java environment variables and those jar packages

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.