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

jlink plugins for vendor information and command-line options

    Details

    • Subcomponent:
    • Resolved In Build:
      b21

      Backports

        Description

        The jlink tool can already be used to create a custom run-time image, but some uses require additional customization:

          - If the resulting image is distributed to end users, it can be useful to change some of the vendor information, such as the vendor version string and the URLs for bug reports.

          - In some cases, the virtual machine in the resulting image must be started with additional, baked-in command-line options.

        We’ll address these needs via a set of new jlink plugins which implement the following options:

          - --vendor-bug-url=<vendor-bug-url> overrides the vendor bug URL baked into the build. The value of the system property "java.vendor.url.bug" will be <vendor-bug-url>.

          - --vendor-vm-bug-url=<vendor-vm-bug-url> overrides the vendor VM bug URL baked into the build. This value will be displayed in VM crash logs.

          - --vendor-version=<vendor-version> overrides the vendor version string baked into the build, if any. The value of the system property "java.vendor.version" will be <vendor-version>. This value will be displayed in the output of java --version.

          - --add-options=<options> prepends the specified <options> string, which may include whitespace, before any other options when invoking the VM in the resulting image.

        Example usage:

        $ jlink --add-modules java.base --output /tmp/jre --vendor-version='XyzzyVM 3.14.15' --vendor-bug-url=https://bugs.xyzzy.com/ --add-options='-Dfoo=xyzzy'
        $ /tmp/jre/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
        OpenJDK Runtime Environment XyzzyVM 3.14.15 (build 14-mr+0-cjdk-81d748451934)
        OpenJDK 64-Bit Server VM XyzzyVM 3.14.15 (build 14-mr+0-cjdk-81d748451934, mixed mode)
        $

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  mr Mark Reinhold
                  Reporter:
                  mr Mark Reinhold
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  9 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: