[Native Image] os.name is "Windows Server 2022" on Windows Server 2025
Describe the Issue
On Windows Server 2025 (build 26100), System.getProperty("os.name") is Windows Server 2022 in a native executable, while the JVM of the same GraalVM gives Windows Server 2025.
WindowsSystemPropertiesSupport stops at Windows Server 2022: for Windows 10.0 on a server (not VER_NT_WORKSTATION), buildNumber > 20347 gives Windows Server 2022, and there is no branch for Windows Server 2025 (https://github.com/oracle/graal/blob/master/substratevm/src/com.oracle.svm.core.windows/src/com/oracle/svm/core/windows/WindowsSystemPropertiesSupport.java).
The JDK has one (src/java.base/windows/native/libjava/java_props_md.c, JDK 25):
/* 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";Using the latest version of GraalVM can resolve many issues.
- I tried with the latest version of GraalVM.
GraalVM Version
Oracle GraalVM for JDK 25 (graalvm/setup-graalvm, java-version 25, distribution graalvm). The branch is also missing on master.
Operating System and Version
Windows Server 2025 10.0 (build 26100), amd64: the GitHub Actions windows-2025 runner
Troubleshooting Confirmation
- I tried the suggestions in the troubleshooting guide.
Run Command
osname.exe
Expected Behavior
Windows Server 2025 10.0, as with java OsName.
Actual Behavior
Windows Server 2022 10.0
Steps to Reproduce
public class OsName {
public static void main(String[] args) {
System.out.println(System.getProperty("os.name") + " " + System.getProperty("os.version"));
}
}native-image OsName osname- On Windows Server 2025:
osname.exeprintsWindows Server 2022 10.0, andjava OsNameprintsWindows Server 2025 10.0.
Additional Context
Found by the CI of the Quarkus Desktop showcase (https://github.com/Eng-Fouad/quarkus-desktop-showcase), which compares a JVM run and a native run of the same application on the windows-2025 runner. A fix is the buildNumber > 26039 branch of the JDK.
Run-Time Log Output and Error Messages
No response
Source: oracle/graal