Summary
Extend the 'jlink' tool with options to customize the java.vendor, java.vm.vendor and java.vendor.url system properties in the resulting image.
Problem
Downstream distributions of JDK would like to customize system properties related to the vendor information.
Currently the build system supports using branding.conf to customize those properties. However, the java.vm.vendor value is hardcoded to "Oracle Corporation" unless the build is configured with the --with-vendor-name option. Also java.vm.vendor should have the same default value ("N/A") as the java.vendor system property.
The jlink tool can be used to create a custom run-time image with altered values for several "java.vendor.*" system properties, but is missing the capability to update java.vendor, java.vm.vendor and java.vendor.url system properties.
Solution
Define new jlink plugins to implement the desired options. The default value for java.vm.vendor is "N/A", the same default value as java.vendor.
Specification
The new jlink plugins will implement the following options:
--vendor=<vendor>override the vendor string baked into the build, if any. The value of the system property "java.vendor" will be<vendor>.--vendor-url=<vendor-url>override the vendor URL baked into the build. The value of the system property "java.vendor.url" will be<vendor-url>.--vendor-vm <vendor>override the vendor string baked into the build, if any. The value of the system property "java.vm.vendor" will be<vendor>.
Example usage:
$ jlink --add-modules java.base --output /tmp/jre --vendor 'Example Corp.' --vendor-url https://example.com --vendor-vm 'Example VM'
$ /tmp/jre/bin/java -XshowSettings:properties --version 2>&1 | grep -i example
java.vendor = Example Corp.
java.vendor.url = https://example.com
java.vm.vendor = Example VM
$
In addition, the value of java.vm.vendor system property is "N/A" by default unless the build is configured with --with-vendor-name option to specify the vendor which will be set in java.vendor and java.vm.vendor.
- csr of
-
JDK-8342035 jlink plugins for setting java.vendor, java.vm.vendor and java.vendor.url
-
- Closed
-