JDK-8345511 : jlink plugins for setting java.vendor, java.vm.vendor and java.vendor.url
  • Type: CSR
  • Component: tools
  • Sub-Component: jlink
  • Priority: P4
  • Status: Closed
  • Resolution: Withdrawn
  • Submitted: 2024-12-04
  • Updated: 2025-04-24
  • Resolved: 2025-04-24
Related Reports
CSR :  
Description
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`.

Comments
This CSR has been in Provisional state for some time. A reminder that JDK 25 rampdown 1 start is on June 5, 2025. CSRs intended to get in the release should be Finalized well ahead of the deadline. If there is no longer interest in this CSR, it can be withdrawn.
22-04-2025

Moving to Provisional.
10-12-2024

Thanks for the info. JDK 25 is perfectly fine for us. No need to try to get it into 24. Thanks for taking care.
05-12-2024

As I understand it, the request is for this feature in JDK 24 but it is unlikely to be integrated before the branch for 24. So if approved, it will initially be in main line for 25. To get to 24 would require approval. So for now, I've set the CSR fixVersion to "24, 25".
05-12-2024