java.lang.UnsupportedClassVersionError: Bad version number in .class file

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
via Google Groups by Marcus Haebler

Update "latest" to Java 8 on DockerHub.

,
Expert tip

This might be caused by and outdated version of Java, SonarQube now uses Java 8 as default. You might upgrade java or use an older version of SonarQube.

Solutions on the web

via Stack Overflow by alex
, 2 years ago
Bad version number in .class file
via Oracle Community by chrishurst, 1 year ago
Bad version number in .class file
via hivmr.com by Unknown author, 1 year ago
via Google Groups by Unknown author, 4 months ago
java.lang.UnsupportedClassVersionError: Bad version number in .class file
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.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at undefined.Main._main(Main.java:202)
at undefined.Main.main(Main.java:98)

Users with the same issue

Once, 1 year ago
Once, 1 year ago
Once, 2 days ago
Samebug visitor profile picture
Unknown user
Once, 4 days ago
Once, 1 week ago
337 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.