You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Enrico Maldia <em...@ebuilt.net> on 2000/07/05 20:20:17 UTC

Another stupid new user question

Enrico Maldia wrote:

> Hi Again
>
>        When trying to compile a directory using the javac. In the
> classpath parameter relative or direct path doesn't seem to work.  Is
> there a way to get around this? Any help would be great.
>
> Here is the syntax that I'm using
>
>         <java scrdir=""${src}"
>                   destdir="${buildpath}"
>                  classpath="/home/whatever/jarfile/jarfile.zip"
>                  debug="on"
>         />
>
>        Thanks Peter Donald for answering my last question.
>
> Thanks again
>
> -Enrico


Re: Another stupid new user question

Posted by Enrico Maldia <em...@ebuilt.net>.
THANKS RUSSEL.  SORRY I misstyped !!!

   WHAT I MEAN IS..

     <javac srcdir="{src}"
        destdir="${buildpath}"
       classpath="/home/whatever/jarfile/jarfile.zip"
       debug="on"
      />


   This doesn't work...


Enrico Maldia


Russell Gold wrote:

> At 2:20 PM -0400 7/5/00, Enrico Maldia wrote:
> >Enrico Maldia wrote:
> >
> >> Hi Again
> >>
> >>        When trying to compile a directory using the javac. In the
> >> classpath parameter relative or direct path doesn't seem to work.  Is
> >> there a way to get around this? Any help would be great.
> >>
> >> Here is the syntax that I'm using
> >>
> >>         <java scrdir=""${src}"
> >>                   destdir="${buildpath}"
> >>                  classpath="/home/whatever/jarfile/jarfile.zip"
> >>                  debug="on"
> >>         />
>
> The first thing that I see is that you are using "java" (which runs a program) rather than "javac" (which compiles a program). Is that what you intended to do?
>
> The second thing is that IF you do mean to invoke "java" rather than "javac" your parameters are wrong. In particular, you are trying to set the classpath on a java task. If you do mean to do that, you should also include the parameter 'fork="yes"' to make ant start a separate java process for which it can set the classpath.
>
> ------------------------------------------------------------------------
> Russell Gold                     | "... society is tradition and order
> russgold@acm.org    (preferred)  | and reverence, not a series of cheap
> russgold@netaxs.com              | bargains between selfish interests."
> rgold@thesycamoregroup.com       |   - Poul Anderson, "Iron"


Re: Another stupid new user question

Posted by Russell Gold <ru...@acm.org>.
At 2:20 PM -0400 7/5/00, Enrico Maldia wrote:
>Enrico Maldia wrote:
>
>> Hi Again
>>
>>        When trying to compile a directory using the javac. In the
>> classpath parameter relative or direct path doesn't seem to work.  Is
>> there a way to get around this? Any help would be great.
>>
>> Here is the syntax that I'm using
>>
>>         <java scrdir=""${src}"
>>                   destdir="${buildpath}"
>>                  classpath="/home/whatever/jarfile/jarfile.zip"
>>                  debug="on"
>>         />

The first thing that I see is that you are using "java" (which runs a program) rather than "javac" (which compiles a program). Is that what you intended to do? 

The second thing is that IF you do mean to invoke "java" rather than "javac" your parameters are wrong. In particular, you are trying to set the classpath on a java task. If you do mean to do that, you should also include the parameter 'fork="yes"' to make ant start a separate java process for which it can set the classpath.

------------------------------------------------------------------------
Russell Gold                     | "... society is tradition and order
russgold@acm.org    (preferred)  | and reverence, not a series of cheap
russgold@netaxs.com              | bargains between selfish interests."
rgold@thesycamoregroup.com       |   - Poul Anderson, "Iron"