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

mzukowski at bco.com mzukowski at bco.com
Mon Feb 11 09:57:00 PST 2002


antlr.jar does not include the antlr.Tool classes.  It is a jar for the
runtime classes which a parser built with antlr needs.  Try creating your
own jar from the antlr directory, then see if that works.

Monty

> -----Original Message-----
> From: Jeff Vincent [mailto:JVincent at Novell.Com]
> Sent: Monday, February 11, 2002 9:55 AM
> To: antlr-interest at yahoogroups.com
> Subject: [antlr-interest] Help w/ ANTLR task inside ANT/Netbeans . . .
> please
> 
> 
> 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
> searches.
> 
> 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
> installation,
> including the path specified in the ANT help for optional tasks
> (NBINSTALL/modules/patches/org-apache-tools-ant-module/).
> 
> 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
> have
> the antlr.jar included (mounted filesystems).  I can't seem to
> override
> the "java.class.path" property.  It just seems that it is either
> ignoring any properties available when invoking "java" to process my
> .g
> files.
> 
> 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
> project
> is shared and I want to put the necessary .jar references in the ANT
> task and not require a bunch of external configuration before
> launching
> netbeans.
> 
> 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
> passing
> in the new classpath.  If that is the only way of using a
> task-specific
> classpath, what good is the ANTLR task (or any other task that
> requires
> 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.
> 
> Thanks,
> 
> Jeff
> 
> 
> 
>  
> 
> Your use of Yahoo! Groups is subject to 
> http://docs.yahoo.com/info/terms/ 
> 
> 
> 

 

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



More information about the antlr-interest mailing list