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

Rename JMOD section name for native libraries from native to lib

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • tools
    • b157
    • Verified

        jlink defines a scheme to name a non-java resource entry in each module for plugins to lookup/add/remove from the modules:
          /$MODULE/$JMOD_SECTION/<path>

        jlink will write such entry to image/<dir>/<path> according to the jmod section:
          conf -> image/conf
          bin -> image/bin
          man -> image/man
          include -> image/include
          native -> image/lib with the exception on windows DLLs goes to image/bin

        The jmod section name is implementation details but it’s exposed via the jlink plugin option for example --exclude-files plugin uses this naming scheme to specify the files/patterns in non-classes JMOD section.

        Option: --exclude-files=<pattern-list> of files to exclude
        Description: Specify files to exclude. e.g.: **.java,glob:/java.base/native/client/**

        When using the jlink plugin, it would be natural for the users to map to the image layout and `native` would be non-intuitive to map to `lib` directory. The anomaly is on windows which might be the reason why the jmod section is named `native`. But I find `native` that could be confusing too.

              mchung Mandy Chung (Inactive)
              mchung Mandy Chung (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: