Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Unsupported major.minor version error

📅 2015-Jan-25 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ error, java, version ⬩ 📚 Archive


I executed a Java program downloaded from the web and got this error:

Exception in thread "main" java.lang.UnsupportedClassVersionError: net/filebot/Main : Unsupported major.minor version 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(
    at Method)
    at java.lang.ClassLoader.loadClass(
    at sun.misc.Launcher$AppClassLoader.loadClass(
    at java.lang.ClassLoader.loadClass(
    at sun.launcher.LauncherHelper.checkAndLoadMain(


This error from the Java virtual machine (VM) executing the Java class file indicates that the version 52.0 is not supported by it. This is usually means that the Java program requires a newer version of Java VM for its execution.

The mysterious part is the number 52, which is much higher than any Java version we know. This is a Java class file format version number. The Java version that maps to 52 can be found from the table of class file format version to Java version mapping. For 52.0, it is Java 8. So, this error means that I need to have Java 8 VM to execute this class file. That was correct since I had Java 7 on this computer.

© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘📧