> However, if instead we run ant with -classpath (the same > classpath with some > java source dirs), the compile fails on an import on one of the > dependencies > on one of the source files in the classpath. We also tried setting the > classpath inside the build.xml file. That didn't work either.
Here is part of my build file... classpath is working great for me. ... <path id="project.classpath"> <pathelement path="${classpath}"/><!-- system classpath... in my case it's empty --> <fileset dir="${lib.home}"> <include name="**/*.jar"/><!-- This are external jar files --> </fileset> <pathelement location="${src.home}"/> <!-- src.home points to the directory under which all my java files are arranged in directories according to standard package naming --> </path> <!-- this is the portion that compiles the sources --> <javac srcdir="${src.home}" destdir="${compile.to}\" debug="on" > <classpath refid="project.classpath"/> </javac> ... Hope this example helps. Otherwise I would suggest posting the appropiate parts of your buils file and I'll take a look and see what is going on. You should note that the path element is not under a target, but declared before any target so that it can be reused in other parts. The javac part IS declared inside a target. Good Luck. Ylan Segal. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>