ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Erion <>
Subject Problem getting Ant to find Antlr as an optional task
Date Thu, 27 Dec 2001 15:07:31 GMT

I'm trying to use the antlr optional task, but am having some
difficulty gettng ant to find "antlr.jar".  I was under the impression
that if I placed "antlr.jar" in ant's lib directory (along with
"jakarta-ant-1.4.1-optional.jar") it would be found by the task, but
that's not happening.  I get the following message when I run ant.

    [antlr] Setting target to: C:\project\rules.g
    [antlr] Setting output directory to: C:\project
    [antlr] java antlr.Tool -o C:\project C:\project\rules.g
    [antlr] java.lang.NoClassDefFoundError: antlr/Tool
    [antlr] Exception in thread "main"

using: <antlr target="${src}/rules.g" outputdirectory="${src}"/>

Of course, if I move the antlr tree to the build file's basedir
everything works out, but I'd prefer not to do that.  I also tried
setting CLASSPATH to "antlr.jar", and that didn't seem to work either.

I'm using win2k, JDK, ant 1.4.1, antlr 2.7.1 -- I believe
I've set up the environment variables (ANT_HOME, JAVA_HOME, and PATH)
to the appropriate values since ant seems to run fine, oh, and this is
a binary install, I did not build ant from the sources.

Anyone have any thoughts on what I might be doing wrong?



Do You Yahoo!?
Send your FREE holiday greetings online!

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message