All targeted classes in a MR-JAR file should target the same or at least a lower bytecode level. For example, META-INF/versions/9 must not contain .class files targeting Java 10 or higher.
The --validate option introduced into the jar tool since Java 17 seems a good place to check this constraint.
The --validate option introduced into the jar tool since Java 17 seems a good place to check this constraint.