ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Reilly" <peter.kitt.rei...@gmail.com>
Subject Re: Classpath issue with <javac> task
Date Tue, 12 Jun 2007 13:39:23 GMT
On 12 Jun 2007 12:55:13 -0000, query <search2006@rediffmail.com> wrote:
>
> Hi,
>
> I have been using ANT tool to compile java source files.
>
> <javac srcdir="${src}" destdir="${dst}" includeAntRuntime="no" includes="**/*.java">
>    <classpath refid="app.path"/>
> </javac>
>
> In the log file, it is displaying the destination folder also in the classpath though
I have not defined it in classpath.
The destination folder has always been auto-added to the classpath by ant's
javac task.

> Is it <javac> task bug?
It is a design decision.
It is is not done, javac would not see the dependent classes and recompile
them. For example,
src/A.java:
class A {
   B b;
}
src/B.java
class B {
}

one compiles A and B, creating classes/A.class and classes/B.class
now change A.java, if javac does not have the "classes" as a classpath,
it will recompile B.java.

Peter

>
> Log file:
>
> [javac] Using modern compiler
>     [javac] Compilation arguments:
>     [javac] '-d'
>     [javac] 'E:\ANTBUILD\eg\tempclass'
>     [javac] '-classpath'
>     [javac] 'E:\ANTBUILD\eg\tempclass';C:\PROGRA~1\jdk1.5.0;E:\ANTBUILD\eg\eg1.jar
>     [javac] '-sourcepath'
>     [javac] 'E:\ANTBUILD\eg\tempsource'
>     [javac] '-g:none'
>     [javac]
>     [javac] The ' characters around the executable and arguments are
>     [javac] not part of the command.
>

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


Mime
View raw message