From ce740a563603aafba1fbfc80cb8cb1497f6393fe Mon Sep 17 00:00:00 2001 From: MBaesken Date: Thu, 19 Sep 2024 09:37:37 +0200 Subject: [PATCH] JDK-8340387 --- src/hotspot/os/windows/os_windows.cpp | 5 ++++- src/java.base/windows/native/libjava/java_props_md.c | 9 +++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/hotspot/os/windows/os_windows.cpp b/src/hotspot/os/windows/os_windows.cpp index 1acce2540a855..ed62fe612aae3 100644 --- a/src/hotspot/os/windows/os_windows.cpp +++ b/src/hotspot/os/windows/os_windows.cpp @@ -1947,7 +1947,10 @@ void os::win32::print_windows_version(outputStream* st) { // - 2016 GA 10/2016 build: 14393 // - 2019 GA 11/2018 build: 17763 // - 2022 GA 08/2021 build: 20348 - if (build_number > 20347) { + // - 2025 Preview build : 26040 + if (build_number > 26039) { + st->print("Server 2025"); + } else if (build_number > 20347) { st->print("Server 2022"); } else if (build_number > 17762) { st->print("Server 2019"); diff --git a/src/java.base/windows/native/libjava/java_props_md.c b/src/java.base/windows/native/libjava/java_props_md.c index 5eefb6a9fc9e8..357c697ab5f30 100644 --- a/src/java.base/windows/native/libjava/java_props_md.c +++ b/src/java.base/windows/native/libjava/java_props_md.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -444,6 +444,8 @@ GetJavaProperties(JNIEnv* env) * where (buildNumber > 17762) * Windows Server 2022 10 0 (!VER_NT_WORKSTATION) * where (buildNumber > 20347) + * Windows Server 2025 10 0 (!VER_NT_WORKSTATION) + * where (buildNumber > 26039) * * This mapping will presumably be augmented as new Windows * versions are released. @@ -527,7 +529,10 @@ GetJavaProperties(JNIEnv* env) case 0: /* Windows server 2019 GA 10/2018 build number is 17763 */ /* Windows server 2022 build number is 20348 */ - if (buildNumber > 20347) { + /* Windows server 2025 Preview build is 26040 */ + if (buildNumber > 26039) { + sprops.os_name = "Windows Server 2025"; + } else if (buildNumber > 20347) { sprops.os_name = "Windows Server 2022"; } else if (buildNumber > 17762) { sprops.os_name = "Windows Server 2019";