RFR: JDK-8273229: Update OS detection code to recognize Windows Server 2022
David Holmes
dholmes at openjdk.java.net
Thu Sep 2 07:53:29 UTC 2021
On Thu, 2 Sep 2021 06:43:16 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
> Hello, please review this small change.
> The OS detection code of the JDK/JVM should recognize the new Windows server 2022 :
>
> https://docs.microsoft.com/en-us/lifecycle/products/windows-server-2022
> https://docs.microsoft.com/en-us/windows-server/get-started/windows-server-release-info
>
> The build number of Windows server 2022 according to the documentation in the second link is 20348 .
> Thanks, Matthias
Hi Matthias,
Some minor suggestions but okay as-is.
Thanks,
David
src/hotspot/os/windows/os_windows.cpp line 1871:
> 1869: // distinguish Windows Server 2016, 2019 and 2022 by build number
> 1870: // Windows server 2019 GA 10/2018 build number is 17763
> 1871: // Windows server 2022 build number is 20348
Perhaps to avoid too much future editing:
// Distinguish Windows Server by build number:
// - 2016 GA 10/2016 build: 14393
// - 2019 GA 11/2018 build: 17763
// - 2022 GA 08/2021 build: 20348
src/java.base/windows/native/libjava/java_props_md.c line 478:
> 476: * where (buildNumber > 17762)
> 477: * Windows Server 2022 10 0 (!VER_NT_WORKSTATION)
> 478: * where (buildNumber > 20347)
There is a comment at line 392 that you may want to adjust too - perhaps just say "Windows Server 2016+" to avoid the need to keep updating it.
-------------
Marked as reviewed by dholmes (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/5347
More information about the hotspot-runtime-dev
mailing list