Click to See Complete Forum and Search --> : importing Java packages


linux_deity
06-26-2001, 12:16 PM
For class we have to write this program that includes 2 different source files. The catch is that one of the files has to import the other one as a package. I "package utils" the second one, put it in the utils directory, and the "import utils.PrintLineOfStars;" in the first program. However, a compilation error comes up saying that the package does not exist. I have included the c:\jdk1.3.1\utils in the PATH so this is not the problem. I am truly stumped.

Dru Lee Parsec
06-26-2001, 02:34 PM
It's Classpath. The directory one level above the utils directory must be in the classpath.