GoogleContainerTools / GoogleContainerTools/jib
JIB Maven not supporting JDK 24
- Dominant language
- Java
- Stars
- 14.5k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
**Environment:**
Jib version: 3.4.6
Build tool: Maven 3.9.6
OS: Ubuntu 24.04 LTS (Linux amd64)
JDK: Temurin 24.0.1
**Description of the issue:**
Attempting to build a Java 24 project using jib-maven-plugin fails with:
_"Unsupported class file major version 68"_
`[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:3.4.6:build (default-cli) on project ms-name-restaurants: Execution default-cli of goal com.google.cloud.tools:jib-maven-plugin:3.4.6:build failed: Check the full stace trace, and if the root cause is from ASM ClassReader about unsupported class file version, see https://github.com/GoogleContainerTools/jib/blob/master/docs/faq.md#i-am-seeing-unsupported-class-file-major-version-when-building: Unsupported class file major version 68 -> [Help 1] `
This happens even after updating to the latest version of Jib (3.4.6).
From what I can tell, the underlying ASM version used by Jib doesn't yet support Java 24 bytecode (major version 68), making Jib currently incompatible with projects compiled using Java 24.
**Expected behavior:**
Jib should support projects compiled with Java 24 (--release 24) and allow building container images with bytecode version 68, provided a compatible base image is used (e.g., eclipse-temurin:24-jre).
**Steps to reproduce:**
Create a simple HelloWorld.java class using JDK 24.
Configure Maven compiler plugin with 24.
Use latest jib-maven-plugin (3.4.6) with a base image supporting Java 24 (eclipse-temurin:24-jre).
Run mvn compile jib:build.
My specific Maven configuration is:
`
com.google.cloud.tools
jib-maven-plugin
3.4.6
openjdk:24-slim
xxx/xxx
pass
OCI
`
Contributor guide
Assessment
This issue has not been assessed yet.