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 Stack Overflow by ERJAN

This exception occurs when using an older version of java. Mainly when trying to run a jar compiled with a newer Java version in an older Java version. We can avoid this issue by executing the jar in the same version which it was compiled.

,
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 Jenkins JIRA by Matthew Buckett, 1 year ago
Bad version number in .class file
via Jenkins JIRA by Matthew Buckett, 1 year ago
Bad version number in .class file
via nabble.com by Unknown author, 1 year ago
Bad version number > in .class file
via apache.org by Unknown author, 2 years ago
via Google Groups by momalxa, 5 months ago
Bad version number in .class > file
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:96)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at hudson.FilePath.act(FilePath.java:434)
at hudson.FilePath.copyTo(FilePath.java:869)
at hudson.FilePath.copyTo(FilePath.java:857)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 2 years ago
Once, 2 weeks ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

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