[antlr-interest] Antlr 3.0 on Windows - starting troubles error org.antlr.tool.ErrorManager.setLocale(ErrorManager.java:393)

David Llewellyn david.llewellyn at ideaworks3d.com
Mon Aug 6 08:23:21 PDT 2007


Hello There Everybody,

I have recently started to use Antlr 3.0 on Windows XP to construct a 
parser for some configuration files in a project I am working on.

However I've been faced with a seemingly insurmountable problem before I 
even get started.  I had resolved my initial CLASSPATH
issues and then found myself facing this problem

C:> java -classpath 
c:\antlr-3.0\lib\antlr-3.0.jar;c:\antlr-3.0\lib\stringtemplate-3.0.jar 
org.antlr.Tool
Exception in thread "main" java.lang.NoClassDefFoundError: antlr/TokenStream
        at org.antlr.tool.ErrorManager.setLocale(ErrorManager.java:393)
        at org.antlr.tool.ErrorManager.<clinit>(ErrorManager.java:355)
        at org.antlr.Tool.main(Tool.java:67)


Unfortunately I am no Java expert, but reviewing the 
ErrorManager.java:393, the problem seems to be coming when it tried to 
create a new StringTemplateGroup.

Has anybody else experienced this problem?  Can anybody make any 
suggestions on how to remedy this? 

My initial searches in to this error on the net came up fruitless, hence 
my I am posting here
( the slightly worrying solution I have at the moment is to go back to 
antlr-2.7.7.jar which seems to work fine, but means I cant utilise 
AntlrWorks anymore :( and am forced to use the old syntax etc)

Here are some pertinent details about my machine

Microsoft Windows XP [Version 5.1.2600]

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

As always thanks in advance for any help that might be forthcoming



David Llewellyn

Ideaworks3d Ltd


More information about the antlr-interest mailing list