public static String getOsType ( ) { String osType = "unknown" ; String osName = System . getProperty ( "os.name" ) ; if ( osName . contains ( "Windows" ) ) { osType = "Windows" ; } else if ( osName . contains ( "Linux" ) ) { osType = "Linux" ; } return osType ; }
Tries to determine the tpye of OS the application is running on . At the moment only Windows and Linux are supported .