ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "NIkhil R. Deshpande" <nikh...@flashmail.com>
Subject Re: Problem with <antlr> task
Date Thu, 01 Feb 2001 05:38:36 GMT

> > When I put antlr.jar in %ANT_HOME%\lib directory and run
> > ant, I get following exception:
> > 
> >     java.lang.NoClassDefFoundError: antlr/Tool
> > 
> 
> but not if you use fork="no", right?

I'm sorry, but with or without fork attribute, fork="no"  or "false"
or "yes" or "true", all give the same exception.

For the same setup, running antlr.Tool class through <java>
task runs fine without any exceptions:

<java classname="antlr.Tool">
          <arg value="-o"/>
          <arg value="${build.dir}/${parser.pkg.dir}/antlr"/>
          <arg value="src/parsergrammars/antlr_aliases.g"/>
</java>

But then I would miss the dep. checking done in <antlr> task
and would have to use <uptodate> task (which is not as elegant
to use if there are more than 1 targetfiles).

With regards,
 Nikhil


> > But if I put antlr.jar in CLASSPATH before running ant, then
> > everything works ok.
> 
> When forking of a separate VM, <antlr> doesn't specify a classpath at
> all, thus using the setting for CLASSPATH from your environment which
> is not altered by ant.bat.


Mime
View raw message