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

Incorrect os.version reported on macOS Tahoe 26 (Beta)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3 P3
    • 26
    • 25
    • core-libs
    • None

      After macOS 15.x, the next newer version of macOS is now 26 (currently in beta https://developer.apple.com/documentation/macos-release-notes/macos-26-release-notes ). JDK, when building on macOS, recommends the use of XCode 15.4 https://github.com/openjdk/jdk/blob/master/doc/building.md :

      > It is recommended that you use at least macOS 14 and Xcode 15.4, but earlier versions may also work.

      When using this version of XCode to build the JDK on macOS 26 (Beta), the macOS NSProcessInfo and NSOperatingSystemVersion APIs report the macOS version as 16.0. Other parts of macOS ecosystem report a different and more correct version. For example, the "sw_vers" returns this on macOS 26 Beta:

      sw_vers
      ProductName: macOS
      ProductVersion: 26.0
      BuildVersion: 25A5279m

      The JDK code uses the NSProcessInfo and NSOperatingSystemVersion APIs to determine the operating system version and once determined, that value is set to the "os.version" Java standard system property. Setting this to 16.0 on macOS 26 can (and does) cause problems. In the past, when we had a similar issue with macOS 10.16 (which actually was macOS 11), we updated the JDK code to correctly detect the mismatch and set the os.version appropriately (JDK-8253702). We should do the same for macOS 26 which should then allow us to use XCode 15.4 for building the JDK on macOS 26.

            jpai Jaikiran Pai
            jpai Jaikiran Pai
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated: