java.lang.UnsupportedClassVersionError: class file version 61.0, this version of the Java Runtime only recognizes up to 55.0
Code compiled for a newer Java version is running on an older JVM.
Meaning
Class file versions map to Java releases: 52 = 8, 55 = 11, 61 = 17, 65 = 21. The runtime must be at least the compile target. Mismatched JAVA_HOME, Docker base images and IDE settings are the usual causes.
Common causes
- App built with JDK 17/21 but run on Java 8/11
- Dependency compiled for a newer Java (e.g. Spring Boot 3 requires 17)
- Different JAVA_HOME for build and run
- Old JRE base image in Docker
⚡ Quick fix
- Run on a JVM ≥ the class version (61 → Java 17)
- Or compile with
--release 11for older runtimes - Update the Docker base image (
eclipse-temurin:17-jre)
Detailed fix by platform
Java
- Set the compile target (Maven):xml
<properties> <maven.compiler.release>17</maven.compiler.release> </properties>
How to diagnose
- Versions — Class version in the message → Java release
- Runtime —
java -versionwhere it runs - Dependencies — Which library requires newer Java?
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026