[antlr-interest] Get java.lang.NoClassDefFoundError when working with StringTemplate 3.0?

Can Zhen canjren at yahoo.com
Thu Jun 26 09:03:45 PDT 2008


I used the example on page 220 of the book "The Definitive ANTLR Reference" to test Antlr 3.0.1 with StringTemplate 3.0. I put the generated lexer and parser java class into the src folder of my project and created a test program to test it. But it failed with java.lang.NoClassDefFoundError.  It failed when executing the following codes in the parser:
protected StringTemplateGroup templateLib =
new StringTemplateGroup("CMinusParserTemplates", AngleBracketTemplateLexer.class);
 
I already added the antlr and stringtemplate jar files as external jar files on Eclipse. Any ideas why it failed?
 
Thanks!


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080626/a74959e7/attachment.html 


More information about the antlr-interest mailing list