This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes use of rt.jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "use of rt.jar" Watch "use of rt.jar" New topic
Author

use of rt.jar

vikas malviya
Greenhorn

Joined: Aug 06, 2009
Posts: 14
Hello............
is it necessary to include any of the below jar files in the classpath

1.rt.jar ,tools.jar,dt.jar

2.what is the use of these jar files???




Regards,
Vikas Malviya
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38460
    
  23
No. Unless you use a very old JVM, it will automatically search those .jars.

The Sun Java API classes are (I think) inside rt.jar. On my machine dt.jat appears to contain all the Swing class files. You will have difficulty running anything without rt.jar!
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41598
    
  55
No, it's not necessary. They contain code that's used by the various tools (java, javac, javadoc, jar, ...) and other stuff used internally by the JVM. But the JVM knows how and where to find these jar files, so you don't need to worry about them.


Ping & DNS - my free Android networking tools app
 
wood burning stoves
 
subject: use of rt.jar