Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the use of rt.jar file in java? [duplicate]

Tags:

java

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.

like image 680
Ravi Avatar asked Feb 22 '11 04:02

Ravi


People also ask

What is the use of RT jar in Java?

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.

Where is Rt jar stored?

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.

Is RT jar optional?

2) You must include rt. jar in your classpath, otherwise you don't have access to core classes e.g. java. lang. String, java.

What replaced RT jar?

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.


1 Answers

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

like image 159
CoolBeans Avatar answered Sep 28 '22 08:09

CoolBeans