public static OSType calculateOS(){
  String osName=System.getProperty("os.name");
  osName=osName.toLowerCase(Locale.ENGLISH);
  if (osName.startsWith("mac os")) {
    return OSType.APPLE;
  }
  if (osName.startsWith("windows")) {
    return OSType.WINDOWS;
  }
  if (osName.startsWith("linux")) {
    return OSType.LINUX;
  }
  if (osName.startsWith("sun")) {
    return OSType.SUN;
  }
  return OSType.UNKNOWN;
}

public static OSType calculateOS ( ) { String osName = System . getProperty ( "os.name" ) ; osName = osName . toLowerCase ( Locale . ENGLISH ) ; if ( osName . startsWith ( "mac os" ) ) { return OSType . APPLE ; } if ( osName . startsWith ( "windows" ) ) { return OSType . WINDOWS ; } if ( osName . startsWith ( "linux" ) ) { return OSType . LINUX ; } if ( osName . startsWith ( "sun" ) ) { return OSType . SUN ; } return OSType . UNKNOWN ; }
calculates the current ostype
