eclipse-jdt / eclipse-jdt/eclipse.jdt.core
Get "Incompatible .class files version in required binaries" in Eclipse when a dependency jar specifies a "Build-Jdk-Spec" version newer than project
- Dominant language
- Java
- Stars
- 237
- Forks
- 195
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 47
Description
I am using 2025-09, but I've seen the same symptom with the last several versions.
I have a project that builds and runs fine with Java 17 from Maven. In Eclipse, however, it gives me this error:
```
Incompatible .class files version in required binaries. Project 'soap-api-client' is targeting a 17 runtime, but is compiled against '.../.m2/repository/ch/qos/logback/logback-core/1.5.8/logback-core-1.5.8.jar' (from the container 'Maven Dependencies') which requires a 21 runtime
```
I looked in the manifest for this, and this is the only mention of Java 21:
```
Build-Jdk-Spec: 21
```
At first I thought this was caused by m2e, as I noticed this: https://github.com/eclipse-m2e/m2e-core/issues/1211 . However, they're telling me this is not in m2e's domain, and JDT is more likely. In https://github.com/eclipse-m2e/m2e-core/issues/1806 they mentioned that they can get around this by changing the Error vs. Warning state of one compile check, but that "Incompatible ..." error is not in the list of issues I can configure in Preferences.
Contributor guide
Assessment
This issue has not been assessed yet.