I have a class file located somewhere on the filesystem. It doesn't have a package declaration (was created in default package).
Now I want to use that class file in a package. I added the class folder in the build path, but eclipse can not find it.
package test;
public class Test1{
public static void main(String[] args){
ExternalClass.print(); // ExternalClass cannot be resolved.
}
}
If I move "Test1" to the default folder, everything works fine:
public class Test1{
public static void main(String[] args){
ExternalClass.print();
}
}
How can I use "ExternalClass" in the package "test" ?