JDK core jar of rt.jar

1. JDK directory display

 

2. Introduction to rt.jar 

2.1. JAR interpretation 

        In the software field, a JAR file (Java Archive, English: Java Archive  ) is a software package file format , usually used to aggregate a large number of Java class files, related metadata and resources (text, pictures, etc.) files into one Files in order to develop Java platform applications or libraries that can run on different platforms.

        JAR packages are a convenient way to organize and manage Java code and dependencies, and make it easy to share and deploy code with other developers. JAR packages also support digital signatures and version control to ensure code integrity and security.

2.2.rt.jar 

2.2.1. Introduction to rt.jar

        The rt.jar package is one of the core libraries of the JRE environment, including the classes and interfaces in the Java standard class library, as well as the classes and interfaces required by the Java virtual machine. The rt.jar package is usually located in the lib directory of the JDK installation directory and is a required file when the Java program is running.

        rt.jar stands for runtime JAR and contains bootstrap classes. The rt.jar package contains a large number of Java classes, such as java.lang.Object, java.lang.String, java.util.List, etc. These classes provide the basic functions required for Java programs to run. In addition, the rt.jar package also contains some classes and interfaces required by the Java virtual machine, such as java.lang.Class, java.lang.Thread, java.lang.reflect.Method, etc. These classes and interfaces are Java virtual machines. The normal operation of the machine provides the necessary support.

  • rt.jar stands for runtime and contains all compiled calss files of the core Java runtime environment.
  • You must include rt.jar in your classpath, otherwise you don't have access to core classes such as java.lang.String, java.lang.Thread, java.util.ArrayList or java.io.InputStream, etc., and in all Java APIs other kind. You can use the IDE to open and view the content in rt.jar, which not only contains all Java APIs, but also contains the internal classes specified in the com package.

        View the structure of the rt.jar package in the IDE tool, as shown in the figure below:

 

 To be continued. .

 

Guess you like

Origin blog.csdn.net/weixin_52255395/article/details/132430699
jar