I'm learning Antlr and trying to use the latest jar file (4.12.0) on a Windows 10 machine.
I get an error when I try to run it:
java -jar antlr-4.12.0-complete.jar
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/antlr/v4/Tool
has been compiled by a more recent version of the Java Runtime (class file version 55.0),
this version of the Java Runtime only recognizes class file versions up to 52.0
I uninstalled all versions of Java, cleared out my PATH and environment variables of any Java references, rebooted and downloaded what appears to be the latest Java version on the java.com downloads page. It says 'Recommended Version 8 Update 361 Release date: January 17, 2023'.
After the install (and a reboot for good measure) I'm disappointed to see the same error.
I don't work with Java and am unfamiliar with versions but I've tried to work this out. Right now I've found a 'Microsoft Build of OpenJDK', a 'JDK 20 reached General Availability on 21 March 2023' and a 'Java SE Development Kit 20' and am doing some reading, but am feeling thoroughly confused by it all. I think I just need a Java runtime of the right version but haven't found one yet.
So, help please, what do I need to install to get Antlr working?