public static void readFromCommandLine(Settings settings, String[] args) {
        if (args == null) return;

        Map<String, String> map = new HashMap<String, String>();
        String key;
        for (int i = 0; i < args.length; i++) {
            key = args[i];
            if (key != null && key.length() > 0 && key.startsWith("--")) {
                map.put(key.substring(2), args[i + 1]);
            }
        }

        read(settings, map);

        String configFile = map.get("config");
        if (configFile != null && configFile.length() > 0)
            readFromFile(settings, configFile, false);
    }