[antlr-interest] new guy

Sinan sinan.karasu at boeing.com
Wed Nov 14 10:40:23 PST 2001


george artin wrote:
> 
> Thanks a lot Remus it helps.
> I found a page named "getting started with ANTLR" it
> asks you to run the instruction "java antlr.Tool t.g",
> where "t.g" is the grammar file and when I run the
> instruction it gives me this error message:
> "Exception in thread "main"
> java.lang.NoClassDefFoundError: antlr/Tool"
> I don't know why this message appear? the class path
> for java is tuned correctly and I can run any java
> file.
> 

What version java are you using? What OS?

Assuming Unix/Linux

# java -classpath $WHERE_BE_ANTLR/antlr.jar antlr.Tool t.g

should work.

Also if you have compatilility problems, do

# cd $WHERE_BE_ANTLR
# find antlr -name "*.class" -exec rm {} \;
# javac -g `find antlr -name "*.java" -print`
# jar cvf myAntlr.jar antlr

and then 

# java -classpath $WHERE_BE_ANTLR/myAntlr.jar antlr.Tool t.g

One caveat:

If you use Ric Klaren's version and get an error , then delete the file

Cpp2CodeGenerator.java

Sinan

 

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



More information about the antlr-interest mailing list