[antlr-interest] getting started with antlr
Andreas Bartho
andreas.bartho at inf.tu-dresden.de
Wed Sep 19 02:09:27 PDT 2007
Hi,
> $ java org.antlr.Tool t.g
> Exception in thread "main" java.lang.NoClassDefFoundError: org/antlr/Tool
>
> $ java -jar antlr-3.0.1.jar org.antlr.Tool t.g
> Failed to load Main-Class manifest attribute from
> antlr-3.0.1.jar
>
> The above message with manifest attribute is a complete mystery for me.
The -jar parameter is used for executable jars only. The manifest of an
executable jar file tells Java the Main class. As antlr-3.0.1.jar is not
an executable jar file, there is no Main class entry in its manifest.
> I've got my CLASSPATH assigned correspondingly.
Are you sure?
This is what I use for conversion (Windows style, I think you have to
use colons instead of semicolons in unix):
java -cp
libs/antlr-2.7.7.jar;libs/antlr-3.0.1.jar;libs/stringtemplate-3.1b1.jar;
org.antlr.Tool T.g
Andreas
More information about the antlr-interest
mailing list