Run with arguments.

@param args arguments.
176675
public void runArgs(String[] args) {
        CommandLineParser clParser = new DefaultParser();
        CommandLine line;
        String host;
        String port;
        CMD cmd;
        String[] cmdArgs;
        final PrintStream CONSOLE = System.out;
        try {
            // parse the command line arguments
            line = clParser.parse(options, args);

            if (line.hasOption("output")){
                String location = line.getOptionValue("output");
                File output = new File(location);
                FileOutputStream fos;
                try {
                    fos = new FileOutputStream(output);
                } catch (FileNotFoundException e) {
                    e.printStackTrace();
                    throw new ParseException(String.format("Wrong -o option. args %s\n",Arrays.asList(args)));
                }
                PrintStream out = new PrintStream(fos);
                System.setOut(out);

            }
            if (line.getOptions().length==0 || line.hasOption("help")) {
                if ((line.getOptions().length > 2) || (line.getOptions().length==2 && !line.hasOption("output"))){
                    throw new ParseException(String.format("Wrong -help option. args %s\n", Arrays.asList(args)));
                }
                printUsage(System.out);
            }
            if (line.hasOption("server")) {
                String server = line.getOptionValue("server");
                try {
                    host = server.split(":")[0];
                    port = server.split(":")[1];
                }catch (Exception e){
                    throw new ParseException(String.format("Wrong -server option. args %s\n", Arrays.asList(args)));
                }
                ServiceDirectory.getServiceDirectoryConfig().setProperty(
                        DirectoryServiceRestfulClient.SD_API_SD_SERVER_FQDN_PROPERTY,
                        host);
                ServiceDirectory.getServiceDirectoryConfig().setProperty(
                        DirectoryServiceRestfulClient.SD_API_SD_SERVER_PORT_PROPERTY,
                        port);
            }

            if (line.hasOption("exec")) {
                String commandString = line.getOptionValue("exec");
                cmdArgs = parseCommand(commandString);
                try {
                    cmd = CMD.valueOf(cmdArgs[0]);
                } catch (IllegalArgumentException e) {
                    throw new ParseException(String.format("Unknown command [ %s ] \n", commandString));
                }
                if (cmd.sizeOfArgs + 1 != cmdArgs.length) {
                    throw new ParseException(
                            String.format("Wrong arguments number for command %s, required %s but %s \n",
                                    cmdArgs[0], cmd.sizeOfArgs, cmdArgs.length - 1));
                }
                switch (cmd) {
                    case getInstanceOf:
                        lookupInstance(cmdArgs);
                        break;
                    case getAllInstancesOf:
                        lookupInstances(cmdArgs);
                        break;
                    case getAllServices:
                        getAllServices();
                        break;
                    case registerService:
                        registerService(cmdArgs);
                        break;
                    default:
                        fail("command " + cmd + " is unsupported yet");
                        break;
                }

            }
        } catch (ParseException exp) {
            // oops, something went wrong
            exp.printStackTrace();
            try {
                TimeUnit.MILLISECONDS.sleep(100L);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            printUsage(System.err);
        }
        System.setOut(CONSOLE);
    }
630953
public static void main(String[] args) throws ResponderConfigException {

    Responder responder = initialize(args);
    if (responder != null) {
      responder.run();
    }

  }
167022
protected static void main(String args[]) {
	int from = Integer.parseInt(args[0]);	
	int to = Integer.parseInt(args[1]);
	
	statistics(from,to);
}
1200644
public void start(String[] args) {
		this.args = args;
		try {
			this.run(args);
		}
		catch (Exception e) {
			e.printStackTrace();
		}
		this.exit();
	}
1261876
public void run( String[] args ) throws Exception {

		// Check
		File baseDirectory = null;
		if( args.length != 1
				|| ! (baseDirectory = new File( args[ 0 ])).exists())
			throw new RuntimeException( "The path of the module's directory was expected as an argument." );

		// Update
		UpdateSwaggerJson updater = new UpdateSwaggerJson();
		JsonObject newDef = updater.prepareNewDefinitions();
		updater.updateSwaggerJson( baseDirectory, newDef );
	}
9845
public static void main(String[] args) throws Throwable {
		CliArguments arguments = CliArguments.parse(args);
		if (arguments.isSet() && !arguments.isUsageMode()) {
			CliRunner runner = new CliRunner(arguments);
			try {
				runner.run();
			} finally {
				runner.close();
			}
		} else {
			PrintWriter out = new PrintWriter(System.out);
			printUsage(out);
			FileHelper.safeClose(out);
		}
	}
86867
public static void main(String[] args)
	{
		CommandLineRemoteRunner runner = new CommandLineRemoteRunner();
		LoggingMonitor monitor = new LoggingMonitor(System.out, System.err);
		runner.setMonitor(monitor);

		try
		{
			runner.run(args);
		}
		catch (ParseException e)
		{
			System.err.println(e.getMessage());
			System.err.println("Try '--help' for more information.");

			if (e.getCause() != null)
			{
				System.err.println("Caused by:");
				e.getCause().printStackTrace(System.err);
			}

			System.exit(1);
		}
		catch (Throwable t)
		{
			monitor.exceptionOccured(t);
			System.exit(1);
		}
	}
767226
public static void main(String[] args) {

        DDLGenerationUtility util = new DDLGenerationUtility();

        // No task handlers since this is a single function script.
        // At least it is right now.
        int rc = util.runProgram(args);

        System.exit(rc);
    }
271707
public static void main(final String[] args) {
        new SpringApplicationBuilder(CasCommandLineShellApplication.class)
            .banner(new DefaultCasBanner())
            .bannerMode(Banner.Mode.CONSOLE)
            .logStartupInfo(true)
            .web(WebApplicationType.NONE)
            .run(args);
    }
243019
public static void main(String[] args) throws Exception {
      Shell shell = new ShellImpl();
      shell.init(args);
      shell.run();
      System.exit(0);
   }
800590
public void run(List<String> args) throws IOException {
    checkNotNull(args);

    Process p = runFunc.run(path(args));
    assert (p != null);

    try {
      // TODO Move the copy onto a thread, so that FFmpegProgressListener can be on this thread.

      // Now block reading ffmpeg's stdout. We are effectively throwing away the output.
      CharStreams.copy(wrapInReader(p), System.out); // TODO Should I be outputting to stdout?

      throwOnError(p);

    } finally {
      p.destroy();
    }
  }
1337013
public static void main(String[] args) {
        boolean success = Orchid.getInstance().start(
                StandardModule.builder().args(args).build()
        );
        System.exit((success) ? 0 : 1);
    }
837942
public function run(...$args): void
    {
        $container = $this->getContainer();
        $instance = $container->get($this->classIdentifier);

        $instance->{$this->callbackMethod}(...$args);
    }
488100
public void run(String... args) {
        int maxIteration = 10;
        int totalMoreFast = 0;
        int totalMoreFastWithThreadPool = 0;
        int totalMoreFastPacketThreadPool = 0;
        for (int i = 0; i < maxIteration; i++) {
            LOGGER.info("**********************************");
            long jxnetRunnerRes = jxnetRunner.run();
            long jxnetWithThreadPoolRunnerRes = jxnetWithThreadPoolRunner.run();
            long jxnetPacketThreadPoolRunnerRes = springJxnetWithThreadPoolRunner.run();
            long pcap4jRunnerRes = pcap4jRunner.run();
            long pcap4jWithThreadPoolRunnerRes = pcap4jWithThreadPoolRunner.run();
            long pcap4jPacketThreadPoolRunnerRes = pcap4jPacketWithThreadPoolRunner.run();
            LOGGER.info("Jxnet x Pcap4j");
            boolean moreFast = jxnetRunnerRes < pcap4jRunnerRes;
            boolean moreFastWithThreadPool = jxnetWithThreadPoolRunnerRes < pcap4jWithThreadPoolRunnerRes;
            boolean moreFastPacketThreadPool = jxnetPacketThreadPoolRunnerRes < pcap4jPacketThreadPoolRunnerRes;
            if (moreFast) {
                totalMoreFast++;
            }
            if (moreFastWithThreadPool) {
                totalMoreFastWithThreadPool++;
            }
            if (moreFastPacketThreadPool) {
                totalMoreFastPacketThreadPool++;
            }
            LOGGER.info("Is Jxnet runner more fast? {} : {}",
                     moreFast ? "YES" : "NO",
                    jxnetRunnerRes + " and " + pcap4jRunnerRes);
            LOGGER.info("Is Jxnet with thread pool runner more fast? {} : {}",
                    moreFastWithThreadPool ? "YES" : "NO",
                    jxnetWithThreadPoolRunnerRes + " and " + pcap4jWithThreadPoolRunnerRes);
            LOGGER.info("IS Jxnet packet with thread pool runner more fast? {} : {}",
                    moreFastPacketThreadPool ? "YES" : "NO",
                    jxnetPacketThreadPoolRunnerRes + " and " + pcap4jPacketThreadPoolRunnerRes);
            LOGGER.info("**********************************\n");
        }
        LOGGER.info("Total jxnet more fast                                 : {}/{}", totalMoreFast, maxIteration);
        LOGGER.info("Total jxnet more fast with thread pool                : {}/{}", totalMoreFastWithThreadPool, maxIteration);
        LOGGER.info("Total jxnet more fast packet decoder with thread pool : {}/{}", totalMoreFastPacketThreadPool, maxIteration);
        executorService.shutdownNow();
    }
102892
public static void main(String[] args) {
		PrintStream out = System.out;
		if (args.length > 0) {
			try {
				out = new PrintStream(new File(args[0]));
			} catch (FileNotFoundException e) {
				System.out.printf(ERR_FILE, args[0]);
			}
		}
		MBeanScanner mBeanScanner = new MBeanScanner();
		List<Config> configs = mBeanScanner.scan();
		ConfigWriter cw;
		cw = new ConfigWriter(out, configs);
		cw.write();
	}
189241
def run(args):
    """"""
    raw_arguments = get_arguments(args[1:])
    process_arguments(raw_arguments)
    walk.run()
    return True
697095
public void addArguments (final String [] arguments)
  {
    if (arguments != null)
    {
      for (final String argument : arguments)
      {
        addArgument (argument);
      }
    }
  }