how to detect platform?  
Author Message
juventuz2000





PostPosted: 2005-7-24 19:38:00 Top

java-programmer, how to detect platform? What I really want to do is set the look and feel according to
platform, win-lnf for windows, gtk-lnf for linux. I don't have a mac to
try it on, but the same for mac would make sense.

When I use getSystemLookAndFeelClassName() I still get the butt ugly
metal on linux, so I'd like some way to detect which platform I'm on so
I can set the lnf accordingly..

Also, does the gtk lnf work on Windows? I've tried with sun-jdk15 and
sun-jre15, none of which seem to have it.

 
Andrew Thompson





PostPosted: 2005-7-24 19:42:00 Top

java-programmer >> how to detect platform? On 24 Jul 2005 04:37:48 -0700, email***@***.com wrote:

Sub: Re: how to detect platform?

<http://www.physci.org/pc/property.jsp?prop=os.name>

--
Andrew Thompson
physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
Beats A Hard Kick In The Face
 
R.F. Pels





PostPosted: 2005-7-24 19:52:00 Top

java-programmer >> how to detect platform? email***@***.com wrote:

> metal on linux, so I'd like some way to detect which platform I'm on so
> I can set the lnf accordingly..

Consult the system properties:

System.out.println(System.getProperty("os.name"));

and work from there. @see UIManager

> Also, does the gtk lnf work on Windows? I've tried with sun-jdk15 and
> sun-jre15, none of which seem to have it.

Probably not.

--
Ruurd
.o.
..o
ooo