0

The error I met is the same as OSError: [Errno 8] Exec format error: '/Users/CodingStark/opt/anaconda3/share/jupyter/kernels/java/ijava-1.3.0.jar'. However, the answer of this post does not help me to resolve the issue.

The error is

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: io/github/spencerpark/ijava/IJava has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0

I tried to change "java" in the argv array described in that post to "/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/bin/java" but still the same error appears. I checked the java version by java -version and it gives openjdk version "11.0.9.1". Do you have any idea why it is not working? Thank you!

Zhang Yongheng
  • 125
  • 2
  • 10

1 Answers1

0

The software that you are trying to run is compiled using Java 9. You are trying to run it with Java 8. This is why error is occurring.

I checked the java version by java -version and it gives openjdk version "11.0.9.1".

This means the software you are trying to run overrides your system settings like by setting another version of Java. You may need to check the config files and try to find Java settings.

Probably exactly this is causing an issue:

I tried to change "java" in the argv array described in that post to "/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/bin/java"

Andrey E
  • 856
  • 8
  • 18