8
votes

I want to use Antlr to create parser and i followed instruction from

Here

after following all instruction while I am running following command antlr4 -visitor D:\T\arithmetic.g4 I am getting this error msg: Error: Could not find or load main class org.antlr.v4.Tool

using this jar file : C:\Program Files\Java\lib\antlr-4.6-complete.jar

1
What operating system are you using?TomServo
@TomServo I am using windows 10.yashpal

1 Answers

7
votes

Your CLASSPATH environment variable isn't set properly. One very good tutorial on setting up ANTLR4 is here. This includes instructions for Windows and Unix-based environments.