Solved

OS detection

Posted on 2004-04-14
6
316 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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
bigHeights  challenge 13 55
json example 39 114
Printing to a specific printer tray (HP 806dn printer) 3 64
Java Jpanels and Jframe 8 20
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
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 will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn how to implement Singleton Design Pattern in Java.

758 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

17 Experts available now in Live!

Get 1:1 Help Now