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

Most JDK releases report macOS version 12 as 10.16 instead of 12.0

    XMLWordPrintable

    Details

    • Resolved In Build:
      b17
    • OS:
      os_x
    • Verification:
      Verified

      Backports

        Description

        Here are the results of my testing:

        10.16 1.8.0_152-b16
        10.16 1.8.0_162-b12
        10.16 9.0.4+11
        10.16 10.0.1+10
        10.16 10.0.2+13
        10.16 11.0.2+9
        10.16 12.0.2+10
        10.16 13+33
        10.16 13.0.2+8
        10.16 14+36-1461
        10.16 14.0.2+12-46
        10.16 15+35-1559
        10.16 15.0.2+7-27
        10.16 16+36-2231
        10.16 16.0.1+9-24
        12.0 17-ea+25-2252
        12.0 17-ea+29-2576

        I understand that some changes have been backported, but I'm not sure if they have been released or if they are correct.

        I know of two ways to get the right answer regardless of the linked SDK:

        1. Run this program as follows:
                String[] cmd = { "/usr/bin/sw_vers", "-productVersion" };
                String[] env = { "SYSTEM_VERSION_COMPAT=0" };
        2. Parse the file /System/Library/CoreServices/.SystemVersionPlatform.plist
          [note the leading dot in the name]
        These steps would be needed only if the apparent system version is 10.16.

        See https://gitmemory.com/issue/ziglang/zig/7569/756422179 for more information.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                rriggs Roger Riggs
                Reporter:
                alans Alan Snyder
                Votes:
                0 Vote for this issue
                Watchers:
                10 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: