[modules-dev] Review request: 6617767 (add os.platform system property)

Dave Bristor David.Bristor at Sun.COM
Wed Jan 16 16:29:57 PST 2008


This adds a new system property, os.platform, to System properties.

webrev: http://analemma.sfbay.sun.com/java/jdk/ws/libs/rev/6617767/
bugster: http://monaco.sfbay/detail.jsp?cr=6617767

Thus far this passes all tests on Solaris; I'm emailing with Kelly re JPRT to 
test on other platforms.  "all tests" in this case means regression tests for 
Java Modules; I don't see an applicable test for the java.lang.System.

os.name relates to os.platform thusly:

os.name		os.platform
SunOS		solaris
Linux		linux
Windows...	windows

For Windows, the "..." means any kind of windows.  The other names were chosen 
based on what is shown in the spec section 2.12 (Platform Binding).

I updated the javadoc in System.java to add os.platform, but am not sure it is 
necessary nor sufficient.  Must all java implementations provide os.platform? 
  And w/o further documentation, it's not very clear what that means, and I 
don't see an "obvious" place to put an explanation.

I'm not sure about "Unix system-like-(unknown)".  The string has spaces,
unlike the others, which might be a problem.  I don't know if it is a 
trademark problem.  I could presumably put in the circled-R, but that wouldn't 
really help anyone looking for a simple check for that string (it's a pain to 
get that symbol).  The words currently used are what the following Wikipedia 
entry suggests are acceptable to The Open Group:

     http://en.wikipedia.org/wiki/Unix-like

Perhaps it should just be "(unknown").  I'm open to suggestions.
Thanks,
	Dave





More information about the modules-dev mailing list