[antlr-interest] Problem running 2.7.3rc2 (incl. quick fix)

Simon Kellett skellett at anitesystems.de
Wed Feb 18 08:32:17 PST 2004


I have an interesting run-time error.

> export CLASSPATH="/home/skellett/local/share/antlr-2.7.3"
> java antlr.Tool calc.g
Exception in thread "main" java.lang.NoClassDefFoundError: antlr/Tool

> java -cp /home/skellett/local/share/antlr-2.7.3 antlr.Tool calc.g
Exception in thread "main" java.lang.NoClassDefFoundError: antlr/Tool

>  export CLASSPATH="/home/skellett/local/src/antlr-2.7.3rc2"
> java antlr.Tool calc.g
ANTLR Parser Generator   Version 2.7.3 (20040218-1)   1989-2003
jGuru.com

(files created OK)

> ls -l /home/skellett/local/share/antlr-2.7.3/*.jar
/home/skellett/local/src/antlr-2.7.3rc2/*.jar
-rw-r--r--   1 skellett coscos1    366778 Feb 18 15:51
/home/skellett/local/share/antlr-2.7.3/antlr.jar
-rw-r--r--   1 skellett coscos1    366778 Feb 18 15:33
/home/skellett/local/src/antlr-2.7.3rc2/antlr.jar

> diff /home/skellett/local/share/antlr-2.7.3/antlr.jar
/home/skellett/local/src/antlr-2.7.3rc2/antlr.jar
> 
(i.e. no differences)

However, running through truss I see that java is looking for 
/home/skellett/local/share/antlr-2.7.3/antlr/Tool.class

So I created a softlink in /home/skellett/local/share/antlr-2.7.3
> ln -s ../../src/antlr-2.7.3rc2/antlr

And java is happy !! It looks like the .class files need to be
installed in the "share" area, but I do not know if this is the
correct solution as I know nothing about Java !!

Regards, Simon



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
     antlr-interest-unsubscribe at yahoogroups.com

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



More information about the antlr-interest mailing list