Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8346322

Interoperability issue when jlink and jmod module path uses different JDK

XMLWordPrintable

    • minimal
    • Hide
      The fix introduces a fallback mechanism to compute the hash for jmod files, this is in line with OpenJDK 11 since it backported JDK-8243666 where the hash computation logic was changed. There should be no compatibility impact since the fix is introduced as a fallback mechanism retaining the existing logic as is.
      Show
      The fix introduces a fallback mechanism to compute the hash for jmod files, this is in line with OpenJDK 11 since it backported JDK-8243666 where the hash computation logic was changed. There should be no compatibility impact since the fix is introduced as a fallback mechanism retaining the existing logic as is.
    • Other
    • JDK

      Summary

      Interoperability issue when jlink and jmod module path uses different JDK.

      Problem

      The JDK-8243666 fixed in JDK15 changed the hash logic computation for jmod files, this was backported to OpenJDK 11.0.16 and Oracle JDK deferred the backport since it leads to compatibility issue within the same release. Since the hash computation logic differs in Open JDK 11.0.16 and Oracle JDK, the verfication of jmod files generated from OpenJDK 11.0.16 with OracleJDK bundled jlink tool or vice versa fails leading to interoperability issue.

      Solution

      Introduce a fallback mechanism which recomputes the hash upon failure using the same logic as in JDK-8243666. This will fix the compatibility issue with OpenJDK 11, while also retaining the existing logic without affecting the compatibility within the Oracle JDK 11 releases. The issue is specific to JDK 11u release, since the hash computation logic remains same after JDK15 and JDK8u doesn't have support for modules. Also, there is a restriction on usage of jlink with jmod generated from a different JDK release Example: JDK 17 jlink cannot be used to create a installer with jmod file generated using JDK 11

      Specification

      No Spec change.

            pkumaraswamy Prajwal Kumaraswamy
            shadowbug Shadow Bug
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: