Checks if module-info.class
contains the precise JDK version or not, which makes Reproducible Build harder because the exact minor JDK release is required.
- when using
javac --release <r>
with<r>
not equals to major JDK version, no version is stored. - but without
--release
or with--release <JDK major version>
, the detailed JDK version is stored inmodule-info.class
Tested with JDK 11 to JDK 21 EA, for example with 21 EA:
$ ./run.sh
openjdk 21-ea 2023-09-19
OpenJDK Runtime Environment (build 21-ea+31-2444)
OpenJDK 64-Bit Server VM (build 21-ea+31-2444, mixed mode, sharing)
'javac'
1 // requires
#8,8000 // "java.base" ACC_MANDATED
#10 // 21-ea
'javac --release 21'
1 // requires
#8,8000 // "java.base" ACC_MANDATED
#10 // 21-ea
'javac --release 20'
1 // requires
#8,8000 // "java.base" ACC_MANDATED
#0
'javac --release 19'
1 // requires
#8,8000 // "java.base" ACC_MANDATED
#0
- Maven: MCOMPILER-542, fixed in Maven Compiler Plugin 3.12.0
- JDK: JDK-8318913, fixed in Java 22