Java class version error with Java SE 11

I have java se dev kit 11, but when I try to run scripts/run_match.ps1, I get the following error:

C:\Users\Round\Documents\repos\correlation-one\terminal\algos\starter-algo\run.ps1
Error: A JNI error has occurred, please check your installation and try again
Exception in thread “main” java.lang.UnsupportedClassVersionError: towerworker/TowerWorker has been compiled by a more recent version of the Java Runtime (class file version 54.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)

1 Like

Looks like you still need to update the version so try downloading the jdk on this site:

http://www.oracle.com/technetwork/java/javase/downloads/jdk10-downloads-4416644.html

Hmm. That worked. I wonder why java se sdk 11 didn’t work…

I have the exact same error. I’ve downloaded the jdk10 and it still doesn’t work. Please. I need help.

ya ok so this is embarassing… so if there’s anyone out there who installed jdk 10 and are freaking out because you don’t understand what could possibly be wrong, just… restart your gosh darn computer you actual idiot.

1 Like

This means that the java.exe that is called is from Java 8, not Java 10. I uninstalled them all, which left me with nothing working, as I had some remaining files in C:\ProgramData\Oracle\Java which comes in path before the %JAVA_HOME%\bin.

1 Like

Oracle doesn’t support jdk 10 anymore and won’t let me download it, and if I go to this link: https://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase10-4425482.html it will force me to create an Oracle account to download it. Is there a non official link or something?

Have you tried using java 11 instead? It should be backwards compatible (as long as you have a version that is at least java 10 it should work).

Yeah, I have JDK 11, but isn’t it JDK 11 that’s the problem?

Have you tried removing other versions of java and fixing your path variable like Blaulf:

I only have one version of Java installed, and there’s only one entry in PATH for Java.

1 Like

Side quest: Any way to install Java 11 without sudo, apt-get, or write access beyond the home directory? I’d love to upload my code to my college’s computing resources to offload the computations from my poor processor, but it has Java 8 and I can’t figure out how to install Java.

I tried uploading and unzipping a Java 11 tar ball and setting $JAVA_HOME to the folder location, but Java wasn’t having it and didn’t recognize the version.

1 Like

We are looking into this though its tough to reproduce.

Maybe try converting the engine to an executable somehow? I think there are jar to executable converters somewhere. Not sure, but there must be some way.