Sergey Bondarenko wrote:
Imagine situation when you have 3 classes with dependencies between them:
A -> B -> C
Then you compile C.java and pack into c.jar
Then you compile B.java, using c.jar in classpath, and pack it into b.jar
Then you compile A.java, using b.jar.
It works properly in Java 5, but fails in Java 6: compiler can not resolve
dependency B->C (though you compile only A class).
As Stefan said, this is likely not related to Ant as such.
As far as I am aware, the JLS does not specify under which conditions a Java compiler might require transitive dependencies to be present on the classpath, beyond the
obvious fact that if the content of such a dependency could possibly affect the generated bytecode then it must be present. I seem to recall that Jikes used to behave
differently than javac, and I am not that surprised if JDK 5 javac behaves differently from JDK 6 javac. To be on the safe side, you should include c.jar in the classpath
when compiling A.java.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]