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

(props) re-visit how os.name is determined on Mac

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • P3
    • Resolution: Fixed
    • 7
    • 8
    • core-libs
    • b66
    • generic
    • generic
    • Not verified

    Backports

      Description

        The JDK port for OS X gets its value for os.name from a JRS function
        exported by the APple Java Runtime Support framework.
        This is the same we /usr/bin/sw_vers reports, eg :-
        $ /usr/bin/sw_vers
        ProductName: Mac OS X
        ProductVersion: 10.7.4
        BuildVersion: 11E53

        which I am told ultimately reports the value in /System/Library/CoreServices/SystemVersion.plist

        Historically this has either been "Mac OS X", or "Mac OS X Server"
        There have been reports that this could change at any time, eg
        to just "OS X". This would break any app that relies on this property
        to detect the Mac platform using System.getProperty("os.name").startsWith("Mac").

        I can't think of any reason we need to call the JRS function , particularly
        since it could change to almost anything, whereas we
        can just hard code the value instead, ensuring stability.
        If some radically different O/S comes along we likely will need a revved JDK
        for that anyway.

        Attachments

          Issue Links

            Activity

              People

                bchristi Brent Christian
                prr Philip Race
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: