Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do we use rt.jar in a java project?

Tags:

java

What is the necessity of rt.jar ??

like image 643
Chetan Avatar asked Jun 22 '10 07:06

Chetan


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.

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.

Where is Rt jar in Java 9?

jar and tools. jar in JDK 9. Class and resource files previously stored in lib/rt. jar , lib/tools.

Which JAR file in jdk1 7 version do JCL classes run?

Almost all of JCL is stored in a single Java archive file called "rt. jar" which is provided with JRE and JDK distributions.


1 Answers

It contains all the classes provided in the Java Runtime Environment.

If you don't have it on your classpath you will not have access to any of those classes you need to use like java.lang.String or java.io.File.

like image 84
Thorbjørn Ravn Andersen Avatar answered Oct 25 '22 15:10

Thorbjørn Ravn Andersen