RFR: 8342035: jlink plugins for setting java.vendor, java.vm.vendor and java.vendor.url
David Holmes
dholmes at openjdk.org
Mon Dec 2 20:06:38 UTC 2024
On Thu, 7 Nov 2024 21:38:28 GMT, Henry Jen <henryjen at openjdk.org> wrote:
> Add jlink plugins to allow branding change for java.vendor, java.vm.vendor and java.vendor.url.
>
> The jlink plugin will change the value in java.lang.VersionProps, which will set those property values. The `java.vm.vendor` was initialized by VM with value set at build time, and then later be replaced with value from VersionProps.
>
> To keep current behavior, we treat 'N/A' value as no-op to mimic current build behavior. Perhaps we don't really need this, as proper value should be set with `branding.conf` in official build.
I'm not very familiar with jlink so am missing the connection of exactly how the plugin is causing the VM vendor to be overridden. ??
Overall this seems like a huge amount of boiler-plate to change one property at runtime.
src/hotspot/share/runtime/abstract_vm_version.hpp line 30:
> 28: #include "memory/allStatic.hpp" // For declaration of class AllStatic
> 29: #include "utilities/globalDefinitions.hpp"
> 30: #include "runtime/os.hpp"
This include is not needed by the hpp file please put it in the cpp file.
-------------
Changes requested by dholmes (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/21964#pullrequestreview-2473773598
PR Review Comment: https://git.openjdk.org/jdk/pull/21964#discussion_r1866523621
More information about the core-libs-dev
mailing list