What is rt.jar? What constitutes JDK and JRE?

For a beginner, this will be one of the question which they might have. For an expert even though this is well known jar file in Java, very few will know as to what it is and why it is so important. This blog post is a very short post, just giving some details of what rt.jar is and what constitutes Java as a whole (JDK/JRE).

rt.jar contains all the RunTime classes that comprise the Java SE platform’s core API’s. In simple terms this is the jar which contains classes like java.lag.String, java.io package etc. The source code for these API’s can be found in src.zip file in JAVA_HOME.

Since all the classes in the rt.jar are known to the JVM, these classes tend to be left alone with various checks that JVM does while loading these classes onto it. This is also done for various performance reasons. These jars are loaded by primodial class loaders and that’s the reason these classes avoid the basic security checks which the JVM does for other jars/classes.

The base files and folders in the JDK/JRE is shown in the below figure.

JDK-JREFiles

Image Courtesy – docs.oracle.com

For more details on all the various files and directories comprising JDK and JRE, i would suggest going through the official Oracle documentation as follows:

http://docs.oracle.com/javase/6/docs/technotes/tools/windows/jdkfiles.html

As pointed out by one of the reader, since the above link is no longer maintained, the below link which details JDK 1.7 is given:

http://docs.oracle.com/javase/7/docs/technotes/tools/windows/jdkfiles.html

  Page Visitors: 889

The following two tabs change content below.

Tomcy John

Blogger & Author at javacodebook
He is an Enterprise Java Specialist holding a degree in Engineering (B-Tech) with over 10 years of experience in several industries. He's currently the Senior Technical Engineer at Emirates Group IT since 2005. Prior to this he has worked with Oracle Corporation and Ernst & Young. His main specialization is on various web technologies and acts as chief mentor and Principal Architect to facilitate incorporating Spring as Corporate Standard in the organization.

Latest posts by Tomcy John (see all)

3 thoughts on “What is rt.jar? What constitutes JDK and JRE?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">