[antlr-interest] How to call self-build ANTLR correctly?

Micheal J open.zone at virgin.net
Tue Jul 3 14:18:29 PDT 2007


Hi,

> Terence Parr wrote:
> > you need the bin not bin\org\antlr in your path.  Also add 
> the runtime 
> > dir.
> 
> I do the following:
> 
> D:\>java -cp "D:\Install 
> Files\ANTLR\antlr-source\bin\org\antlr\runtime"
> "D:\Install Files\ANTLR\antlr-source\bin"\org.antlr.Tool
> 
> The output:
> 
> Exception in thread "main" java.lang.NoClassDefFoundError: 
> D:\Install Files\ANTLR\antlr-source\bin\org/antlr/Tool

Try:

java -cp "D:\Install Files\ANTLR\antlr-source\bin" org.antlr.Tool

I am assuming the bin directory has (at least) the following structure:

bin
 +-org
    +-antlr
       +-analysis
       +-codegen
       +-misc
       +-runtime
       +-test  (optional?)
       +-tool

> > 
> > Does build.xml help?
> 
> I have never used ANT, so I have no idea what you could mean 
> with that sentence.

No harm in trying ANT btw. If it eases the task of (re-)building ANTLR for
you. 

Micheal

PS	Perhaps someone Nant/MSBuild user might create a Nant (or MSBuild)
build file based on the build.xml file?

-----------------------
The best way to contact me is via the list/forum. My time is very limited.



More information about the antlr-interest mailing list