RFR: 8342035: jlink plugins for setting java.vendor, java.vm.vendor and java.vendor.url
Alan Bateman
alanb at openjdk.org
Mon Dec 2 18:37:52 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.
src/hotspot/share/runtime/threads.cpp line 654:
> 652: initialize_java_lang_classes(main_thread, CHECK_JNI_ERR);
> 653: // Update the java.vm.vendor property with java.lang.VersionProps.VM_VENDOR
> 654: Arguments::update_vm_vendor(VM_Version::vm_vendor());
It seems very ad hoc to update this after initPhase1 has run, need to think through if there is a better way to do this.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21964#discussion_r1866392413
More information about the core-libs-dev
mailing list