• Post Reply Bookmark Topic Watch Topic
  • New Topic

normal J2SE packages and classes in the CLASSPATH  RSS feed

 
siddharth das
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,

I have a question,why it is not required to add normal J2SE packages and classes in the CLASSPATH such as java.util or java.io.IOException.How compiler or JVM will check if I write e.g import.java.io.IOException in my java program.

Thanks in advance,
Siddharth Das
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java adds the standard classes (which are in the file rt.jar somewhere in your JDK or JRE directory) automatically. You always need them, and it would only be cumbersome if you would have to add it to the classpath explicitly all the time.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!