Possible Duplicate:
Why do we use rt.jar in a java project?
I am very confused to knowing about rt.jar file.
What is the role of rt.jar file or use of rt.jar file in java??
Thanks.
What is rt. jar used for? 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.
3) In windows, rt. jar will always reside under $JAVA_HOME/jre/lib, where $JAVA_HOME refers to the JDK installation directory. Even if you don't install JDK and just install JRE, you will see it in the exactly the same location, you won't find rt.
2) You must include rt. jar in your classpath, otherwise you don't have access to core classes e.g. java. lang. String, java.
2 Answers. Show activity on this post. 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.
rt.jar
contains all of the compiled class files for the base Java Runtime environment. You should not be messing with this jar file.
For MacOS it is called classes.jar
and located under /System/Library/Frameworks/<java_version>/Classes
. Same not messing with it rule applies there as well :).
http://javahowto.blogspot.com/2006/05/what-does-rtjar-stand-for-in.html
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