public static OperatingSystem detect() {
        String s = System.getProperty("os.name").toLowerCase();
        if (s.contains("win")) {
            return OperatingSystem.WINDOWS;
        }
        if (s.contains("mac")) {
            return OperatingSystem.MAC_OS_X;
        }
        if (s.contains("solaris") || s.contains("sunos")) {
            return OperatingSystem.SOLARIS;
        }
        if (s.contains("linux") || s.contains("unix")) {
            return OperatingSystem.LINUX;
        }
        return OperatingSystem.UNKNOWN;
    }