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.

,
via Google Groups by Marcus Haebler

Update "latest" to Java 8 on DockerHub.

Solutions on the web

via eclipse-ccase by lzheng
, 1 year ago
Bad version number in .class file
via eclipse.org by Unknown author, 1 year ago
via Google Groups by momalxa, 5 months ago
Bad version number in .class > file
via Google Groups by p.do...@gmail.com, 2 years ago
via knowcoding.com by Unknown author, 1 year ago
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:183)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:576)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:546)

Users with the same issue

Once, 1 week 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
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.