Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

clspath doubt

 
Roopam Samal
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone
If i'm importing any classfile present in
the package other than java.lang say for example
java.io.File,then when i use javac to compile then
compiler should search for "java" package in classpath
mentioned
.My environment variable is
C:\Program Files\Java\jdk1.5.0_06\bin so compiler should
search for the "java" packge in C:\Program Files\Java\jdk1.5.0_06\bin
directory and in this directory there is no java folder so
How is the things working???



thanks in advance
with regards
 
Henry Wong
author
Marshal
Pie
Posts: 21396
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roopam Samal wrote:Hello everyone
If i'm importing any classfile present in
the package other than java.lang say for example
java.io.File,then when i use javac to compile then
compiler should search for "java" package in classpath
mentioned
.My environment variable is
C:\Program Files\Java\jdk1.5.0_06\bin so compiler should
search for the "java" packge in C:\Program Files\Java\jdk1.5.0_06\bin
directory and in this directory there is no java folder so
How is the things working???



The java.io package is part of the rt.jar file, which is located in the standard bootstrap classpath area. Since, it is unlikely that you changed the bootstrap class path, it should be located in the lib directory of where the JVM is installed.

Henry
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic