Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8290422

get wrong result for os.name on Windows 11

XMLWordPrintable

    • generic
    • windows

      ADDITIONAL SYSTEM INFORMATION :
      Windows 11, Java 11

      A DESCRIPTION OF THE PROBLEM :
      get "Window 10" when I run System.getProperty("os.name") on Windows 11.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      run code : System.out.println(System.getProperty("os.name"));

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Windows 11
      ACTUAL -
      Windows 10

      ---------- BEGIN SOURCE ----------
      public class Main {
          public static void main(String[] args) {
              System.out.println(System.getProperty("os.name"));
          }
      }
      ---------- END SOURCE ----------

      FREQUENCY : always


            tongwan Andrew Wang
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: