how to detect platform?

Discussion in 'Java' started by juventuz2000@yahoo.com, Jul 24, 2005.

  1. Guest

    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.
    , Jul 24, 2005
    #1
    1. Advertising

  2. On 24 Jul 2005 04:37:48 -0700, 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
    Andrew Thompson, Jul 24, 2005
    #2
    1. Advertising

  3. R.F. Pels Guest

    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
    R.F. Pels, Jul 24, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Timothy V

    cross-platform

    Timothy V, Aug 23, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,070
    Herman Eldering
    Aug 24, 2003
  2. Lauren Wilson
    Replies:
    2
    Views:
    2,002
    Mary Chipman [MSFT]
    May 9, 2005
  3. jcc
    Replies:
    15
    Views:
    4,674
    Nigel Wade
    May 12, 2006
  4. Coca
    Replies:
    15
    Views:
    628
    Alan Balmer
    Jan 14, 2004
  5. Kaspar Schiess

    platform.rb (was: PLATFORM tests)

    Kaspar Schiess, Nov 25, 2005, in forum: Ruby
    Replies:
    0
    Views:
    113
    Kaspar Schiess
    Nov 25, 2005
Loading...

Share This Page