[antlr-interest] What's this NoClassDefFoundError nonsense?

Hardy, Stephen Stephen_Hardy at rabbit.com
Tue Aug 14 13:49:10 PDT 2007


Java really gets me sometimes...

Can anyone tell me what I'm doing wrong?  Here is the command I'm
running (from the DOS prompt):

"c:\program files\java\jdk1.6.0_02\bin\java" -classpath
c:\antlr-3.0\lib\antlr-runtime-3.0.jar;c:\antlr-3.0\lib\stringtemplate-3
.0.jar;  -jar c2dc.jar

c2dc.jar is my app, which happily compiles (and _was_ running in the
NetBeans IDE).  I can list (jar -tf) the contents of both
antlr-runtime-3.0.jar and c2dc.jar and they appear to be ship shape and
bristol fashion.  However, when I run the above command it gets the
NoClassDefFoundError exception when doing something with
org/antlr/runtime/CharStream, even though CharStream is clearly in the
classpath.

Of course, something must be terribly broken.  Any suggestions?

Another clue: after performing a 'make clean' Ant target in Netbeans, I
can no longer get it to run.  However in this case I am entirely using
the command-line tools, no IDE.  Something is really screwed up - should
I reinstall the JDK?

Regards,
SJH


More information about the antlr-interest mailing list