The role of Tools.jar, Dt.jar, and Rt.jar in Java-----JDK

Source: Internet
Author: User

1, Tools.jar

is located under {java_home}\lib; is used when the system is used to compile a class, that is, when the javac is executed.

Javac Xxx.java is actually running java-calsspath=%java_home%\lib\tools.jar xx.xxx.Main Xxx.java

Javac is the encapsulation of the above command, so Tools.jar doesn't have to be added to classpath .


2,Dt.jar

Located under {java_home}\lib; is a class library about the operating environment , mainly swing 's packages are used in Swing is best to add


3,Rt.jar
Located in {java_home}\jre\libunder; isJAVAThe base Class library, which is where youJava Docinside See all the classes of theclassfile; The default isRoot Classloaderthe load path inside, while in theClaspathIt is not necessary to configure the variable;Jre/libother under the directoryJce.jar,Jsse.jar,Charsets.jar,Resources.jarare inRoot Classloaderin

These variables are set in Classpath to facilitate import in the program, and theWeb system uses Tool.jar

The role of Tools.jar, Dt.jar, and Rt.jar in Java-----JDK

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.