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 GitHub by Athou

You're using an older version of java with classes compiled for java7

,
via Google Groups by Marcus Haebler

Update "latest" to Java 8 on DockerHub.

Solutions on the web

via Google Groups by youssef....@gmail.com (JIRA), 1 year ago
via Stack Overflow by Yalami
, 2 years ago
Bad version number in .class file
via nabble.com by Unknown author, 2 years ago
via axis-java-dev by Apache Jenkins Server, 1 year ago
Bad version number in .class file
via Jenkins JIRA by youssef alami, 1 year ago
Bad version number in .class file
via Jenkins JIRA by youssef alami, 1 year 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:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
at hudson.maven.agent.Main.main(Main.java:143)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
5 times, 11 months ago
4 times, 1 month ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
338 more bugmates

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