[antlr-interest] What's this NoClassDefFoundError nonsense?
ohumbel at gmail.com
Tue Aug 14 14:12:36 PDT 2007
IMHO you cannot mix -classpath and -jar options when starting the java VM.
java -jar your_jar
and add the other necessary .jar files to the classpath in the
MANIFEST of your_jar,
or put every .jar file after the -classpath option and indicate the
main class on the command line.
HTH a little.
On 8/14/07, Hardy, Stephen <Stephen_Hardy at rabbit.com> wrote:
> 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
> .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
> 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?
More information about the antlr-interest