https://issues.apache.org/bugzilla/show_bug.cgi?id=47064





--- Comment #9 from Frank Caputo <[email protected]>  2009-04-27 01:14:19 
PST ---
(In reply to comment #4)
> The System LAF on Windows is not as nice as the Metal LAF, and I'm not 
> prepared
> to change all the LAFs just to support Macs.
> 
> I think one solution would be to allow the property "jmeter.laf" to have a
> local system override, e.g. "jmeter.laf.<os.name>" where <os.name> is obtained
> from the system at run-time.
> 
> JMeter would look for "jmeter.laf.<os.name>", then "jmeter.laf".
> 
> This would allow one to change the default just for Macs.
> 
> What does Java return for os.name on Macs? 
> This is shown in the jmeter.log file.

Mac OS X returns "Mac OS X" for "os.name".

I think you should do something like:

-------- code ------------------------------------

// make os.name lower case and replace alt whitespaces with underscores 
String osName = System.getProperty("os.name").toLowerCase().replaceAll("\\s",
"_");
String laf = System.getProperty("jmeter.laf");

String osLaf = System.getProperty("jmeter.laf." + osName);
if(osLaf != null) {
    laf = osLaf;
}

-------- code ------------------------------------

Here are some interesting links for os.name:
http://developer.apple.com/technotes/tn2002/tn2110.html
http://mindprod.com/jgloss/properties.html#OSNAME

I will test the next nightly.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to