posted 18 years ago
If your current directory is one directory above "bin" and you say "javac bin/Example2.java", the compiler will not look in "bin" for Example1, and you'll get a compiler error. There are three ways to deal with this. First, you could compile with "bin" as your current directory. Second, you could tell the compiler that "bin" is a directory in which to find other classes:
javac -cp bin bin/Example2.java
Third, you could compile both files at once:
javac bin/Example1.java bin/Example2.java
[ October 07, 2005: Message edited by: Ernest Friedman-Hill ]