Solved

OS detection

Posted on 2004-04-14
6
333 Views
Last Modified: 2010-03-31
Hey is there a way to detect if my program is running on a mac or windows machine, because i want to keep the look and feel of each, but need to make small changes.

Thanks
0
Comment
Question by:DrunkenTigerDDD
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 92

Expert Comment

by:objects
ID: 10829471
UIManager.getSystemLookAndFeelClassName()  
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 100 total points
ID: 10829475
System.getProperty("os.name");
0
 
LVL 92

Expert Comment

by:objects
ID: 10829477
String os = System.getProperty("os.name");
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 92

Expert Comment

by:objects
ID: 10829479
no need to in fact know the OS to use the native L&F.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 10829641
8-)
0
 

Author Comment

by:DrunkenTigerDDD
ID: 10829699
Thanks
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question