Summary
-------
Extend the `jlink` tool with options to update the vendor version string, the vendor bug URL, and the vendor VM bug URL in the resulting image, and to allow VM command-line options to be saved in the image.
Problem
-------
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.
Solution
--------
Define new `jlink` plugins to implement the desired options.
Specification
-------------
The new jlink plugins will 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)
$
```