The only jar file I could find inside JAVA-HOME/lib was a file called jrt-fs.jar which is only 105 KB in size.
So where are Runtime (bootstrap) classes then?
You can see that it not only contains all Java API but also internal classes specified in com package. 3) In windows, rt. jar will always reside under $JAVA_HOME/jre/lib, where $JAVA_HOME refers to the JDK installation directory.
rt. jar contains all of the compiled class files for the base Java Runtime environment, as well as the bootstrap classes, which are the run time classes that comprise the Java platform core API.
The rt. jar is where all the java packages reside. For example, if a class file calls for the java. util package, then the JVM can look for it inside the rt. jar, thus enabling it to run correctly.
The best way to update the rt. jar is to install a newer version for Java. ;) If you want to add your own classes in new packages, you can add these to a jar which is in your class path. This is preferable to changing existing classes.
The rt.jar
file was removed in Java 9, but if you need to access the classfiles in the runtime, you can do so easily through the JRT file system. See, for example, https://stackoverflow.com/a/53897006/3553087.
Allow me to quote the migration guide:
Class and resource files previously stored in
lib/rt.jar
,lib/tools.jar
,lib/dt.jar
and various other internal JAR files are stored in a more efficient format in implementation-specific files in thelib
directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With