[antlr-interest] Problem with StringTemplate

Nauman recluze at gmail.com
Sun May 3 23:34:55 PDT 2009


Hi all,

I'm relatively new with Antlr and I'm having a little trouble with
StringTemplate. I tried searching on the mailing lists but without any luck.


I'm trying to use the StringTemplate in a simple example. I get this error
when I try to run my test file.
*
*
>
> *Exception in thread "main" java.lang.NoClassDefFoundError:
> antlr/TokenStream*
>     at Test.main(Test.java:17)
> Caused by: java.lang.ClassNotFoundException: antlr.TokenStream
>     at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>     ... 1 more
>

I'm using StringTemplate 3.2 and antlr 3.1.3. I can see that TokenStream
class is present in the org.antlr.runtime package. The buildpath is set
correctly and both stringtemplate and antlr jars are referenced properly.

Is there a version conflict here? The StringTemplate comes with antlr 2.7.7
but I don't want to use that. I want to use antlr v3. Can anyone help me out
here?

Thanks,
Nauman

Research Associate
Security Engineering Research Group
Institute of Management Sciences
Peshawar, Pakistan

Blog: http://recluze.wordpress.com
Group: http://serg.imsciences.edu.pk
Wiki: http://serg.imsciences.edu.pk/wiki
Art gallery: http://recluse.gfxartist.com

Contact number: +92 (0) 323 93 66 136
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090504/85193717/attachment.html 


More information about the antlr-interest mailing list