How can i fix this?
tried installing new jre
and currently running jdk-13.0.1

D:\Users\Blaze\Desktop\java>java First
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: First has been compiled by a more recent version of the Ja
va Runtime (class file version 57.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)

D:\Users\Blaze\Desktop\java>java -version
java version "1.8.0_251"
Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
Java HotSpot(TM) Client VM (build 25.251-b08, mixed mode)


  • 0
    Maybe it's java 11.
  • 0
    what am i supposed to update here exactly?
    jre or jdk
  • 2
    You have also java 8 installed and the first hava executable found is from java 8. Either uninstall java 8 or use the absolute path.
  • 0
    Well.... I installed on a fresh installation of windows just for java dev I only did those 2 installations
    Jre 1.8 and jdk 13.0.1
  • 3
    @Taqsblaz3 Don't mix Java versions. You compiled with JDK13 which is not very likely compatible with Java 8. At least execute your .class/.Jar with the exact or newer version you compiled for.
  • 1
    @sbiewald thank you all is working now
Add Comment