RFR: 8347755: Support static library in jmod [v4]

Magnus Ihse Bursie ihse at openjdk.org
Thu Mar 6 15:21:09 UTC 2025


On Wed, 5 Mar 2025 15:25:49 GMT, Henry Jen <henryjen at openjdk.org> wrote:

>> src/java.base/share/classes/jdk/internal/jmod/JmodFile.java line 195:
>> 
>>> 193:         } else {
>>> 194:             os.write(JMOD_MAGIC_NO_STATIC_LIB);
>>> 195:         }
>> 
>> This conditionality seems a bit strange. Isn't the idea for the magic to be changed when the format got extended to do more things? I.e. shouldn't this be micro version `0x01` in both cases? Then when dealing with version JMOD `1.1` version you'd be checking if static-libs is there.
>
> The idea is without static lib, it's essential the same as the old format, using the old version so that old tools can be used if static is not included.

I thought the idea was that the jmod format was left intentionally undefined, to not think you could rely on anything else than the corresponding JDK tools to process it? That would mean backwards compatibility should not be a concern.

-------------

PR Review Comment: https://git.openjdk.org/leyden/pull/46#discussion_r1983551278


More information about the leyden-dev mailing list