ANTLR4 Error: Exception in thread "main" java

833 views Asked by At

I follow instruction "Getting Started with ANTLR v4" with simple grammar, no problem with other instruction. But I have one problem.

Except, I'm starting run

grun Expr prog -gui

But show this error:

Exception in thread "main" java.lang.ExceptionInInitializerError at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.antlr.v4.runtime.misc.TestRig.process(TestRig.java:166) at org.antlr.v4.runtime.misc.TestRig.main(TestRig.java:142) Caused by: java.lang.UnsupportedOperationException: java.io.InvalidClassException: org.antlr.v4.runtime.atn.ATN; Could not deserialize ATN with version 3 (expected 2). at org.antlr.v4.runtime.atn.ATNSimulator.deserialize(ATNSimulator.java:114) at ExprLexer.(ExprLexer.java:64) ... 6 more Caused by: java.io.InvalidClassException: org.antlr.v4.runtime.atn.ATN; Could not deserialize ATN with version 3 (expected 2). ... 8 more

Anyone have an Idea? Thanks in Advance.

0

There are 0 answers