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

Brent Christian brent.christian at oracle.com
Tue Nov 13 14:50:59 PST 2012

At present, the JDK port for OS X gets its value for os.name from a JRS 
function exported by the Apple Java Runtime Support framework.

Historically this has either been "Mac OS X", or "Mac OS X Server", but 
there have been reports that this could change at any time, e.g.
to just "OS X".  This would break any app that relies on this property
to detect the Mac platform using something like:


To ensure compatibility going forward, the os.name System property on 
Mac should be hard-coded to the value that is expected, "Mac OS X". 
(FWIW, as of 10.7 Mac OS X Server is no longer a separate edition of the 

Webrev is here:

Note: the setUnknownOSAndVersion() function is unused following my 
change, so I went ahead and removed it.


More information about the macosx-port-dev mailing list