I'm compiling a java classs say "JAVACLASS1" in package "com.test.codegen" and another java class "JAVACLASS2" in package "com.test.locator" using ant task. My JAVACLASS2 uses class from 3rd package say "com.test.components". The problem is while compiling JAVACLASS2 i'm getting package not found error for com.test.package3 import. Please help me in resolving this. here is my ant script.