Just a concept that has eluded me... Anyone who can help make this understandable would be a God send.
in the directory c:/dev/myapp I have the subdir
src/com/mycompany/myapp/MyApp.java which consists of
package com.mycompany.myapp
import com.mycompany.MyUtil
public class MyApp {
public static void main(String args[]) {
new MyApp();
MyUtil.Say();
}
}
src/com/mycompany/util/MyUtil.java which consists of
package com.mycompany.myutil
public class MyUtil {
public static void Say() {
System.out.println("Hello");
}
}
If I go into the subdir src/com/mycompany/myapp and do a compile:
javac MyApp.java
It doesn't find MyUtil.
If i move the com/mycompany/util subdir into src/com/mycompany/
it does find it. It seems like a classpath issue, but I cannot seem to get my head around it.
My ant build seems to understand what is happening and runs things fine. Any enlightenment would be appreciated.