[antlr-interest] Problem to run Beta 4
Jim Idle
jimi at intersystems.com
Tue Sep 19 09:44:30 PDT 2006
java classpaths are a pain, especially in Windows.
To run rc3, you need a few things:
1) The version that Ter distributes is built for JDK 1.4.x not 1.5. I have a 1.5 version as I use JDK 1.5 for various reasons. So, you can build it on JDK 1.5. You might be better off though, as an inexperienced java user, to use the JRE that Ter has built this on. You can build it on 1.5 but really, you need to know a bit more about java to be honest, so try to stick with what is distributed so far. That said, JDK 1.5 should run it I think.
2) You require the antrl2.7.6 jar, which I see you are tying to include in the PATH;
3) You require the stringtemplate library as well though or you will get errors trying to run it. Same thing applies to JDK 1.5.
4) Assuming that you have the appropriate pieces, then:
C:\>set CLASSPATH=C:\antlr3\antlr.jar;C:\antlr3\stringtemplate.jar;C:/antlr3/antlr276.jar
C:\>java org.antlr.Tool
ANTLR Parser Generator Early Access Version 3.0b5 (??, 2006) 1989-2006
usage: java org.antlr.Tool [args] file.g [file2.g file3.g ...]
-o outputDir specify output directory where all output is generated
-fo outputDir same as -o but force even files with relative paths to dir
-lib dir specify location of token files
-report print out a report about the grammar(s) processed
-print print out the grammar without actions
-debug generate a parser that emits debugging events
-profile generate a parser that computes profiling information
-nfa generate an NFA for each rule
-dfa generate a DFA for each decision point
-X display extended argument list
Will do the trick, with directories replaced as appropriate. You might find it easier to set this PATH as a system variable in your environment.
Jim
-----Original Message-----
From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-bounces at antlr.org] On Behalf Of ??? Jigang (Robert) Sun
Sent: Tuesday, September 19, 2006 9:15 AM
To: antlr-interest at antlr.org
Subject: [antlr-interest] Problem to run Beta 4
I tried variuos windows dos commands to run v3 beta4, one of the example is
D:\MiniClean\Clean>path=d:\j2sdk1.4.2_05\bin
D:\MiniClean\Clean>set classpath=D:\minifram\antlr-3.0b4\lib\antlr-2.7.6.jar;D:\minifram\antlr
-3.0b4\lib\antlr-3.0b4.jar;D:\minifram\antlr-3.0b4\src\org\antlr
D:\MiniClean\Clean>java D:\minifram\antlr-3.0b4\src\org\antlr.Tool par.g
Error message:
Exception in thread "main" java.lang.NoClassDefFoundError: D:\minifram\antlr-3/0b4\src\org\ant
lr/Tool
I have downloaded and extracted beta 4 onto D:\minifram\.
Could anyone give me an idea? I am not a java user, so I have this kind of problems.
Thanks.
Jigang
___________________________________________________________
抢注雅虎免费邮箱-3.5G容量,20M附件!
http://cn.mail.yahoo.com
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.5/450 - Release Date: 9/18/2006
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.5/450 - Release Date: 9/18/2006
More information about the antlr-interest
mailing list