public static boolean getConfigFilePath(final String[] args, ProcessResult result) {
        // build file option
        Options options = new Options();
        Option fileOption = new Option(FILEPATH.opt,
                FILEPATH.longOpt, FILEPATH.hasArg, FILEPATH.optDesc);
        if (FILEPATH.hasArg) {
            fileOption.setArgName(FILEPATH.argDesc);
        }
        options.addOption(fileOption);
        // parse args
        CommandLineParser parser = new DefaultParser();
        try {
            CommandLine cli = parser.parse(options, args);
            if (cli == null) {
                result.setFailResult("Parse args failure");
                return result.isSuccess();
            }
            if (!cli.hasOption(FILEPATH.longOpt)) {
                result.setFailResult(new StringBuilder(512)
                        .append("Please input the configuration file path by ")
                        .append("-").append(FILEPATH.opt).append(" or ")
                        .append("-").append(FILEPATH.longOpt).append(" option").toString());
                return result.isSuccess();
            }
            String configFilePath = cli.getOptionValue(FILEPATH.longOpt);
            if (TStringUtils.isBlank(configFilePath)) {
                result.setFailResult(new StringBuilder(512)
                        .append(FILEPATH.longOpt).append(" is required!").toString());
                return result.isSuccess();
            }
            result.setSuccResult(configFilePath);
        } catch (Throwable e) {
            result.setFailResult(new StringBuilder(512)
                    .append("Parse configuration file path failure: ")
                    .append(e.toString()).toString());
        }
        return result.isSuccess();
    }
Get and verify the configuration file path.
@param args     Call parameter array,
                the relevant parameters are dynamic mode, which is parsed by CommandLine.
@param result    the find result

@return          whether success or failure
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/tools/CliUtils.java