UnsupportedClassVersionError Java Origin: Application & API Last updated 14 Oct 2026

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.

Exact message you may see class file versionhas been compiled by a more recent version of the Java Runtime
Seen on: Java Docker

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

  1. Run on a JVM ≥ the class version (61 → Java 17)
  2. Or compile with --release 11 for older runtimes
  3. Update the Docker base image (eclipse-temurin:17-jre)

Detailed fix by platform

Java

  1. Set the compile target (Maven):
    xml
    <properties>
      <maven.compiler.release>17</maven.compiler.release>
    </properties>

How to diagnose

  1. Versions — Class version in the message → Java release
  2. Runtime — java -version where it runs
  3. Dependencies — Which library requires newer Java?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Application & API. Errors that are often confused with or caused by this one (click to open):

ClassNotFoundException — java.lang.ClassNotFoundException / NoClassDefFoundError (Java)ClassNotFoundExceptionInconsistent JVM-target compatibility — Inconsistent JVM-target compatibility detected for tasks 'compileDebugJavaWithJavac' (17) and 'compileDebugKotlin' (1.8) (Android)Inconsistent JVM-targ…JAVA_HOME not set — ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. (Java)JAVA_HOME not setrelease version not supported — [ERROR] Fatal error compiling: error: release version 17 not supported (Java)release version not s…Unsupported class file major version — Gradle: Unsupported class file major version / Android Gradle plugin requires Java 17 to run (Android)Unsupported class fil…You must install or update .NET to run this application — The framework 'Microsoft.NETCore.App', version '8.0.0' (x64) was not found. You must install or update .NET to run this application (.NET)You must install or u…Unsupport…

Explore the map of this error Full error map →

🧠 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.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.