You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by query <se...@rediffmail.com> on 2007/06/12 14:55:13 UTC

Classpath issue with task

  
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.
Is it <javac> task bug?

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.

Re: Classpath issue with task

Posted by Peter Reilly <pe...@gmail.com>.
On 12 Jun 2007 12:55:13 -0000, query <se...@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


Re: Classpath issue with task

Posted by "Scot P. Floess" <fl...@mindspring.com>.
First off what is the value of dst?

Second, what is the definition of app.path?

query 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.
> Is it <javac> task bug?
>
> 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.
>
>   

-- 
Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-392-6730 (Work)

Chief Architect JPlate  http://sourceforge.net/projects/jplate
Chief Architect JavaPIM http://sourceforge.net/projects/javapim


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