Details
-
Bug
-
Resolution: Fixed
-
P3
-
7
-
b66
-
generic
-
generic
-
Not verified
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8176774 | 7-pool | Ramanand Patil | P3 | Resolved | Won't Fix |
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.
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
- backported by
-
JDK-8176774 (props) re-visit how os.name is determined on Mac
- Resolved
- relates to
-
JDK-8004646 OS name and version determination relies on JavaRuntimeSupport.framework
- Closed