ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: i want use recent classes
Date Tue, 26 Oct 2010 13:06:59 GMT
On 2010-10-26, deathsand wrote:

> java : 1.6.0_07 jdk
> ant : 1.6.5

> Root
>  -Source1
>    -src
>    -bin
>  -Source2
>   -src
>   -bin
>  -Source3
>   -src
>   -bin

> If i'll compile Source3, that code needs (source1 and source2)'s class
> files.

> so i compiled like this :

> <path id="fwj">

... way too long to quote ...  does NOT contain Source1/bin or Source2/bin

> </path>

> <javac destdir="Source1/bin" executable="C:/Program
> Files/Java/jdk1.6.0_07/bin/javac" classpathref="fwj" debug="on"
> includeantruntime="false">
>   <src path="Source1/src" />
>   <include name="**/*.java" />
> </java>
> <javac destdir="Source2/bin" executable="C:/Program
> Files/Java/jdk1.6.0_07/bin/javac" classpathref="fwj" debug="on"
> includeantruntime="false">
>   <src path="Source2/src" />
>   <include name="**/*.java" />
> </java>
> <javac destdir="Source3/bin" executable="C:/Program
> Files/Java/jdk1.6.0_07/bin/javac" classpathref="fwj" debug="on"
> includeantruntime="false">
>   <src path="Source3/src" />
>   <include name="**/*.java" />
> </java>

> but it has errors so i can't build complete.

It's hard to diagnose this when you don't tell us what sort of errors
you see.

> when ant script compiled source3 line, i think they can't find source1 and
> source2's class files.

It certainly can't since you don't tell it where to find them.  Try

<javac destdir="Source3/bin"
       executable="C:/Program Files/Java/jdk1.6.0_07/bin/javac"
       debug="on"
       includeantruntime="false">
  <src path="Source3/src" />
  <classpath>
    <path refid="fwj"/>
    <pathelement location="Source1/bin"/>
    <pathelement location="Source2/bin"/>
  </classpath>
</java>

instead

> ant alert "cannot find symbol" errors.

Is this related to your problem?

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message