[antlr-interest] Problem running 2.7.3rc2 (incl. quick fix)
aravind srinivasan
aravinds at convergelabs.com
Wed Feb 18 08:40:56 PST 2004
Hi,
Try adding the jar file to classpath
export CLASSPATH="/home/skellett/local/share/antlr-2.7.3/antlr.jar"
I guess then it should work.
The .jar is similar to .zip and contains files with relative directory structures. When u add it to the
classpath, java searches into this directory structure.
Aravind.
-----Original Message-----
From: Simon Kellett [mailto:skellett at anitesystems.de]
Sent: Wednesday, February 18, 2004 10:02 PM
To: antlr-interest at yahoogroups.com
Subject: [antlr-interest] Problem running 2.7.3rc2 (incl. quick fix)
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
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