public static String getNameOfOS() 
    {
        String os = System.getProperty("os.name").toLowerCase();
        if(os.contains("win"))
        {
            return "Windows";
        }
        if(os.contains("sunos") || os.contains("solaris"))
        {
            return "Solaris";
        }
        if(os.contains("unix"))
        {
            return "Linux";
        }
        if(os.contains("mac"))
        {
            return "Macosx";
        }
        return "Unknown";
    }