[antlr-interest] [HELP][MACOSX] CLASSPATH problems

John Ridgway john at jacelridge.com
Tue Jan 15 14:58:33 PST 2008


If you use Fink, then you can install Antlr as simply as:
   fink install antlr3
though you have to have fink configured to use the unstable tree.   
Then running Antlr becomes
   java org.antlr.Tool ...

Without fink you'll need to set the CLASSPATH environment variable.   
In sh descendants, such as bash, the following works:
CLASSPATH=/antlr-3.0.1/lib/antlr-3.0.1.jar:/antlr-3.0.1/lib/ 
antlr-2.7.7.jar:/antlr-3.0.1/lib/stringtemplate-3.1b1.jar
export CLASSPATH

In csh descendants I believe (though I don't use tcsh) you need the  
following:
setenv CLASSPATH /antlr-3.0.1/lib/antlr-3.0.1.jar:/antlr-3.0.1/lib/ 
antlr-2.7.7.jar:/antlr-3.0.1/lib/stringtemplate-3.1b1.jar

Peace
- John


On Jan 15, 2008, at 4:24 PM, Ruslan Zasukhin wrote:

> Hi All,
>
> I have found only way to make run org.antlr.Tool using this command  
> line:
>
> java -cp "/antlr-3.0.1/lib/antlr-3.0.1.jar:
>          /antlr-3.0.1/lib/antlr-2.7.7.jar:
>          /antlr-3.0.1/lib/stringtemplate-3.1b1.jar" org.antlr.Tool
>
> I.e. I need specify 3 JAR files. If I try specify only folder then  
> it not
> works.
>
>
> java -cp "/antlr-3.0.1/lib" org.antlr.Tool      <<<<<<<<< not works.
>
>
> ---------------------------
> It will be great if on this page
>
>    How do I install this damn thing?
>    http://antlr.org/wiki/pages/viewpage.action?pageId=728
>
> Will be given EXACT steps HOW TO setup this CLASSPATH variable for  
> each OS.
>
> Please keep in mind that not all developers are JAVA guru and each  
> day do
> this :-)
>
> I have spend already 2 hours for Google search, and have found that  
> IT SEEMS
> on MAC OS X I can specify CLASSPATH in the HOME/.tcshrc file.
>
> Is this right?
>
> Can anybody copy/paste own lines for this file?
>
>
> -- 
> Best regards,
>
> Ruslan Zasukhin
> VP Engineering and New Technology
> Paradigma Software, Inc
>
> Valentina - Joining Worlds of Information
> http://www.paradigmasoft.com
>
> [I feel the need: the need for speed]
>
>



More information about the antlr-interest mailing list