Antlr4: Antlrv4 failed installation

Created on 22 Nov 2018  路  7Comments  路  Source: antlr/antlr4


Hi, I was trying to test run the antlrv4 grammar and following the instructions as mentioned here https://raw.githubusercontent.com/antlr/antlr4/master/doc/getting-started.md . However, while trying to test the antlrv4 installation as given in the instructions I get the following error.

$ java -jar /usr/local/lib/antlr-4.7.1-complete.jar 
Error: Invalid or corrupt jarfile /usr/local/lib/antlr-4.7.1-complete.jar

My CLASSPATH is as follows:

$ echo $CLASSPATH
.:/usr/local/lib/antlr-4.7.1-complete.jar:

My JAVA JRE version is:

$ java -version
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)

I've checked that my JRE installation is correct by running a sample hello-world jar file so my question is do I need an older runtime environment in order to run ANTLR or is there something that I am doing incorrectly?

Also, as an additional piece of information I am running all of this inside Docker

Thanks!

actions

Most helpful comment

must be a problem with the downloaded jar. ah. it all changed to https. try https not http.

All 7 comments

must be a problem with the downloaded jar. ah. it all changed to https. try https not http.

Works fine now, thanks for the quick response!

must be a problem with the downloaded jar. ah. it all changed to https. try https not http.

I have the exact same problem, but I did not notice your solution.
Please give me more guidance.

Get the jar using the command curl -O https://www.antlr.org/download/antlr-4.7.1-complete.jar.
Before the change it was curl -O http://www.antlr.org/download/antlr-4.7.1-complete.jar which was incorrect.

must be a problem with the downloaded jar. ah. it all changed to https. try https not http.

nice!!!!

must be a problem with the downloaded jar. ah. it all changed to https. try https not http.

it helps!

It helps~

Was this page helpful?
0 / 5 - 0 ratings

Related issues

james-q-arnold picture james-q-arnold  路  6Comments

Thaina picture Thaina  路  3Comments

nevetS picture nevetS  路  7Comments

rpinchbeck picture rpinchbeck  路  9Comments

arcaartem picture arcaartem  路  3Comments