This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

use of rt.jar

 
vikas malviya
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 48454
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic