Solved

OS detection

Posted on 2004-04-14
6
318 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
  • 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

862 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now