public static void main(String[] args) {
    ApplicationRunnerMain.ApplicationRunnerCommandLine cmdLine = new ApplicationRunnerMain.ApplicationRunnerCommandLine();
    OptionSet options = cmdLine.parser().parse(args);
    Config orgConfig = cmdLine.loadConfig(options);
    Config config = ConfigUtil.rewriteConfig(orgConfig);

    SamzaApplication app = ApplicationUtil.fromConfig(config);
    ApplicationRunner runner = ApplicationRunners.getApplicationRunner(app, config);

    try {
      LOGGER.info("Launching stream application: {} to run.", app);
      runner.run(buildExternalContext(config).orElse(null));
      runner.waitForFinish();
    } catch (Exception e) {
      LOGGER.error("Exception occurred when running application: {}.", app, e);
    }
  }
{@link ApplicationRunnerMain} was designed for deploying {@link SamzaApplication} in yarn
and doesn't work for in standalone.

This runner class is built for standalone failure tests and not recommended for general use.
samza-test/src/main/java/org/apache/samza/test/integration/LocalApplicationRunnerMain.java