#14542·graal

[Native Image] os.name is "Windows Server 2022" on Windows Server 2025

Author: Eng-FouadCreated Sep 28, 2026Updated Sep 28, 2026
Labelsbugnative-image

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):

c
/* 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.

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

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

java
public class OsName {
    public static void main(String[] args) {
        System.out.println(System.getProperty("os.name") + " " + System.getProperty("os.version"));
    }
}
  1. native-image OsName osname
  2. On Windows Server 2025: osname.exe prints Windows Server 2022 10.0, and java OsName prints Windows 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