[antlr-interest] Help w/ ANTLR task inside ANT/Netbeans . . . please

Jeff Vincent JVincent at Novell.Com
Mon Feb 11 09:54:34 PST 2002

I need some perspective if someone would be so kind as to enlighten me.

The answers for this specific issue have gone unanswered in my archive

I am using ANT for the first time within NetBeans 3.3.1 (ANT v1.4.1)
and am attempting to use the ANTLR optional task.  I have placed
ANTLR.jar everywhere I can find a .jar file in my NetBeans
including the path specified in the ANT help for optional tasks

Regardless of where I put the antlr.jar file, it always says
"java.lang.NoClassDefFoundError: antlr/Tool".  The only way around it
that I have found so far is to open a shell, set my shell environment
variable CLASSPATH to point to the antlr.jar and then launch Netbeans
from the shell.

I have tried to set the classpath inside the ANT script, but it seems
to ignore it.  It also ignores all my netbeans properties that all
the antlr.jar included (mounted filesystems).  I can't seem to
the "java.class.path" property.  It just seems that it is either
ignoring any properties available when invoking "java" to process my

What do I need to set in order for the ANTLR task to see (and use) the
antlr.jar file, short of setting the environment variable?  This
is shared and I want to put the necessary .jar references in the ANT
task and not require a bunch of external configuration before

A lot of past e-mail generically refers to setting the ANT classpath
property for use with the "java" task, setting fork to "yes" and
in the new classpath.  If that is the only way of using a
classpath, what good is the ANTLR task (or any other task that
modifications to classpath)?  Traditional makefiles allow building and
setting environment variables temporarily without affecting the global
environment during the make process.  It seems that so far, ANT
disallows this.  Why?

I hope I am missing something simple.




Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 

More information about the antlr-interest mailing list