[antlr-interest] Help w/ ANTLR task inside ANT/Netbeans .
JVincent at Novell.Com
Mon Feb 11 11:47:23 PST 2002
I should have mentioned that I built a .jar w/ all antlr classes (used
mkdebugjar.bat) copied it to the netbeans directory
"C:\netbeans-3.3.1\modules\patches\org-apache-tools-ant-module" AND into
lib, lib/ext, modules, modules/ext with the same error.
It is interesting that it appears to be spawning a new thread/process
using the following command w/ results:
java antlr.Tool -o
Execute:Java13CommandLauncher: java antlr.Tool -o
Exception in thread "main"
com/novell/ndstest/engine/parser/ParserGen.xml  java failed with
return code 1
Total time: 0 seconds
It doesn't set the class path upon execution of the command which is
why it seems to only recognize the CLASSPATH set in the environment.
"Java.exe" doesnt know any better, much less anything about Netbeans.
>>> mzukowski at bco.com 02/11/02 10:57AM >>>
antlr.jar does not include the antlr.Tool classes. It is a jar for
runtime classes which a parser built with antlr needs. Try creating
own jar from the antlr directory, then see if that works.
> -----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 . .
> 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
> 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
> that I have found so far is to open a shell, set my shell
> variable CLASSPATH to point to the antlr.jar and then launch
> from the shell.
> I have tried to set the classpath inside the ANT script, but it
> 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)
> 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
> setting environment variables temporarily without affecting the
> 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
Your use of Yahoo! Groups is subject to
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest