We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Detecting platform / OS
Page Index Toggle Pages: 1
Detecting platform / OS? (Read 320 times)
Detecting platform / OS?
Oct 17th, 2006, 9:59pm
 
Can it be done?  I'd like the sketches to load alternate settings depending on Mac/PC.

Thank you.
Re: Detecting platform / OS?
Reply #1 - Oct 17th, 2006, 10:33pm
 
I think so, try:
Code:
String os=System.getProperty("os.name");


Not entirely sure what the string you get is, but it should contain enough to differentiate Windows/Mac/linux/etc
Page Index Toggle Pages: 1