ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Abley <james.ab...@volantis.com>
Subject Re: javac task
Date Tue, 22 Feb 2005 13:51:19 GMT
On Tue, 2005-02-22 at 11:30, Shigemoto FUJIKURA wrote:
> hi all,
> 
> im stacking on an error which produced by javac task.
> when i use javac task like this:
> 
>   <javac destdir="${classes}" includeantruntime="no">
>     <src path="${src}"/>
>     <classpath>
>       <pathelement path="${lib}/aaa.jar"/>
>       <pathelement path="${lib}/bbb.jar"/>
>     </classpath>
>   </javac>
> 
> the following error occurs.
> 
> compile:
>   [javac] Compiling 241 source files to /home/classes
>   [javac] /home/src/Test.java:162: cannot access xxx.yyy.Zzz
>   [javac] file xxx/yyy/Zzz.class not found
>   [javac]              output.setMessage(qname);
>   [javac]                      ^
> 

Shouldn't that be 

<pathelement location="${lib}/aaa.jar" />
<pathelement location="${lib}/bbb.jar" />

If not, check what you get when running with verbose and compare what
arguments are being passed.

James

> i know this compile error is NOT a classpath issue. because when i 
> execute javac by exec task with almost same args, it succeeds.
> 
>   <property name="jars" value="${lib}/aaa.jar:${lib}/bbb.jar"/>
> 
>   ...
> 
>   <exec executable="javac">
>     <arg line="-classpath ${jars} \
>       -sourcepath ${src} \
>       -d ${classes} \
>       ${src}/Test.java"/>
> 
> additionally, when i execute javac on command line, it also 
> succeeds.
> 
> 
> does anyone know what is the difference between executing javac 
> with javac task and exec task?
> 
> 
> Regards,

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


Mime
View raw message