Java Get OS Name
Posted by tech on
September 14, 2008
This method returns the name of the operating system that the program is running in.
public static String getOsName() { String os = ""; if (System.getProperty("os.name").toLowerCase().indexOf("windows") > -1) { os = "windows"; } else if (System.getProperty("os.name").toLowerCase().indexOf("linux") > -1) { os = "linux"; } else if (System.getProperty("os.name").toLowerCase().indexOf("mac") > -1) { os = "mac"; } return os; }









December 16th, 2010 at 8:10 am
Watch the latest episodes from your favourite tv-show and full, new movies for free! It’s right here: http://freefuntube.com
May 10th, 2011 at 7:36 pm
I love this blog What a super blog!
May 10th, 2011 at 7:37 pm
@movie streaming: thank you
July 29th, 2011 at 11:13 am
Nice info, Thanks a lot for the info.