ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse Glick <>
Subject Re: javac task problem in Java 6
Date Tue, 04 Nov 2008 01:22:10 GMT
Sergey Bondarenko wrote:
> Imagine situation when you have 3 classes with dependencies between them:
> A -> B -> C
> Then you compile and pack into c.jar
> Then you compile, using c.jar in classpath, and pack it into b.jar
> Then you compile, 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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message