release version not supported Java Origin: Application & API OSI layer 7 · Application Last updated 13 Oct 2026

[ERROR] Fatal error compiling: error: release version 17 not supported

The JDK running Maven is older than the Java version the project compiles for.

Exact message you may see release version 17 not supportedinvalid target releaseinvalid source release
Seen on: Java

Meaning

maven.compiler.release=17 needs JDK 17+. JAVA_HOME may point to an older JDK even if a newer one is installed.

Common causes

  • JAVA_HOME / mvn using an older JDK
  • IDE Maven runner configured with a different JDK
  • CI image with old Java

⚡ Quick fix

  1. Check mvn -version (shows the JDK used)
  2. Point JAVA_HOME to the right JDK
  3. Set the JDK in CI (setup-java)

Detailed fix by platform

Java

  1. mvn -version

How to diagnose

  1. JDK — Which Java does Maven use?
  2. Target — maven.compiler.release value

🔧 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):

AccessDeniedException — java.nio.file.AccessDeniedException: /path (Java)AccessDeniedExceptionArithmeticException — java.lang.ArithmeticException: / by zero (Java)ArithmeticExceptionArrayIndexOutOfBoundsException — java.lang.ArrayIndexOutOfBoundsException: Index 5 out of bounds for length 5 (Java)ArrayIndexOutOfBounds…Inconsistent 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 setMaven resolve — [ERROR] Failed to execute goal on project x: Could not resolve dependencies for project (Java)Maven resolveUnsupported class file major version — Gradle: Unsupported class file major version / Android Gradle plugin requires Java 17 to run (Android)Unsupported class fil…UnsupportedClassVersionError — java.lang.UnsupportedClassVersionError: class file version 61.0, this version of the Java Runtime only recognizes up to 55.0 (Java)UnsupportedClassVersi…release v…

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.