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