ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "NIkhil R. Deshpande" <>
Subject NoClassDefFoundError for antlr/Tool
Date Mon, 29 Jan 2001 14:32:26 GMT

I am trying to use the ANTLR task and am getting following

- If I put the antlr.jar in the %ANT_HOME%\lib dir and try
  to run ant, I get 

  java.lang.NoClassDefFoundError: antlr/Tool

  (Please see the attached file output.txt for ant -debug output).

- But if I set my CLASSPATH to point to the antlr.jar, and then
  run ant, I am able to build successfully.

I am using ant 1.3alpha, Sun JDK1.2.2, ANTLR 2.7.1 on WinNT 4.0.
The build.xml fragment is as follows:

<target name="genparser.antlr" depends="prepare"
  <antlr target="src/parsergrammars/antlr_aliases.g"

With and without the fork parameter, both give same error.
I have tried this with rebuilding Ant myself from CVS
and also rebuilding antlr.jar, all with the same JDK1.2.2,
but with the same results.

If I have a set of jars required for the build and I do not want
the user to have to set his/her classpath, how do I modify
the classpath inside the build.xml? (assuming the jars are
at known locations say in the .\lib\ or .\3rd\lib dir).
Not all tasks support the <classpath>.

With regards,

View raw message