Reputation: 6082
I need to build the CSHARP V1 example which comes with ANTLR v 2.7.7.
Command:
D:\Comp\antlr\examples\csharp\csharp_v1>nant
I am getting the following output:
D:\Comp\antlr\examples\csharp\csharp_v1>D:\Comp\nant\bin\nant NAnt 0.85 (Build 0.85.2478.0; release; 10/14/2006) Copyright (C) 2001-2006 Gerry Shaw http://nant.sourceforge.net
Buildfile: file:///D:/Comp/antlr/examples/csharp/csharp_v1/csharp_v1.build Target framework: Microsoft .NET Framework 2.0 Target(s) specified: test
[tstamp] Monday, May 11, 2009 11:21:20 PM. [echo] Building project: 'CSharp v1 Grammar Sample for ANTLR' generate: [exec] java.lang.NoClassDefFoundError: antlr/Tool [exec] Caused by: java.lang.ClassNotFoundException: antlr.Tool [exec] at java.net.URLClassLoader$1.run(Unknown Source) [exec] at java.security.AccessController.doPrivileged(Native Method) [exec] at java.net.URLClassLoader.findClass(Unknown Source) [exec] at java.lang.ClassLoader.loadClass(Unknown Source) [exec] at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) [exec] at java.lang.ClassLoader.loadClass(Unknown Source) [exec] at java.lang.ClassLoader.loadClassInternal(Unknown Source) [exec] Could not find the main class: antlr.Tool. Program will exit. [exec] Exception in thread "main"
BUILD FAILED - 0 non-fatal error(s), 11 warning(s)
D:\Comp\antlr\examples\csharp\csharp_v1\csharp_v1.build(52,10): External Program Failed: java.exe (return code was 1)
Total time: 0.2 seconds.
I have nANT working properly for other builds.
I am not a java guy...any help would be helpful.
Kind regards,
Upvotes: 1
Views: 822
Reputation: 7894
Look in the make file csharp_v1.build.
On line 10 change it from:
<property name="antlr.dir" value="..\..\.."/>
to
<property name="antlr.dir" value="..\..\..\antlr.jar"/>
Upvotes: 1