[antlr-interest] Java doesn't find class definition

Johannes Luber jaluber at gmx.de
Tue Apr 3 07:57:57 PDT 2007


Hello,

whenever I want to start a test program via "java Test" or similar on
the command line, java complains: "Exception in thread "main"
java.lang.NoClassDefFoundError: Test".

I can get the ANTLR tools running and in Eclipse I can start those
programs, too, but for whatever reason it doesn't work on the command
line. As Eclipse doesn't compile some projects because it believes that
a class doesn't have all referenced members, I have to compile those
files on the command line - without problems. But switching back and
forth isn't improving my productivity and getting on my nerves. I'm open
for suggestions how to fix the situation. I'm running Windows XP and the
following JRE:

"java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode)"

The ANTLR libs are in the classpath which the ANTLR tools can access. So
I don't believe that the problem lies in there. If additional
information is required simply ask me.

Thanks in advance,
Johannes Luber


More information about the antlr-interest mailing list