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

effect of jlink plugins for vendor information and command-line options should be sticky


    • Type: Enhancement
    • Status: New
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: tools
    • Labels:


      Using the capabilities added by JDK-8232080, consider my_image produced by jlink as follows:

      > export ALL_MODULES=$(java --list-modules | sed 's:@.*::g' | tr '\n' ',')
      > jlink --keep-packaged-modules=my_image/jmods --add-modules $ALL_MODULES --output my_image --vendor-version='XyzzyVM 3.14.15' --vendor-bug-url=https://bugs.xyzzy.com/ --add-options='-Dfoo=xyzzy'
      > my_image/bin/java -XshowSettings:properties --version 2>&1 | grep -i xyzzy
          foo = xyzzy
          java.vendor.url.bug = https://bugs.xyzzy.com/
          java.vendor.version = XyzzyVM 3.14.15
      Java(TM) SE Runtime Environment XyzzyVM 3.14.15 (build
      Java HotSpot(TM) 64-Bit Server VM XyzzyVM 3.14.15 (build, mixed mode)

      I would expect that when producing my_image2 from my_image, the custom vendor and option overrides would be preserved without having to specify them again to jlink. However, this appears not to be the case:

      > my_image/bin/jlink --keep-packaged-modules=my_image2/jmods --add-modules $ALL_MODULES --output my_image2
      > my_image2/bin/java -XshowSettings:properties --version 2>&1 | grep -i xyzzy

      As a concrete example, for GraalVM this means anyone jlink'ing an image from GraalVM that includes jdk.internal.vm.compiler will be surprised when Graal is not used as the default JIT in the created image.

      One complication here is the relationship between command line options (e.g. EnableJVMCI and UseJVMCICompiler) and internal modules (jdk.internal.vm.ci and jdk.internal.vm.compiiler). That is, making changed values for EnableJVMCI and UseJVMCICompiler sticky requires making inclusion of jdk.internal.vm.ci and jdk.internal.vm.compiiler sticky.


          Issue Links



              • Assignee:
                mr Mark Reinhold
                dnsimon Douglas Simon
              • Votes:
                0 Vote for this issue
                3 Start watching this issue


                • Created: