hi, I am writing an application that has to reference another package, my directory structure is Directory1----->Subdirectory1------>SubsubDirectory1 ----->SubDirectory2 Now i have the Directory1 in my Classpath, and my Foo.java file is in SubsubDirectory1 in which i declare its package as package Directory1.Subdirectory1.SubsubDirectory ; in this same file i have an import statement import Directory1.Subdirectory2.*; now this subdirectory contains a Boo.java file which i reference in Foo.java. The Boo.java file is also not compiled yet and it has the package statement as follows package Directory1.Subdirectory2; now my first question is when i compile the Foo.java i get a compiler error saying "package Directory1.Subdirectory2 does not exist" can anyone solve this problem of mine ? How do i reference Boo.java in my Foo.java Thanks Raj
if Directory1 is in your classpath, then your package name should be Subdirectory1.SubsubDirectory The way it is the system is looking for the Directory1 directory under the classpath directory named Directory1.
"JavaRanch, where the deer and the Certified play" - David O'Meara