Examples of CommandRunner


Examples of org.jnode.shell.CommandRunner

        return "isolate";
    }
   
    public int invoke(CommandLine commandLine, Properties sysProps, Map<String, String> env)
        throws ShellException {
        CommandRunner cr = setup(commandLine, sysProps, env);
        return runIt(commandLine, cr);
    }
View Full Code Here

Examples of org.jnode.shell.CommandRunner

        return runIt(commandLine, cr);
    }

    public CommandThread invokeAsynchronous(CommandLine commandLine, Properties sysProps,
            Map<String, String> env) throws ShellException {
        CommandRunner cr = setup(commandLine, sysProps, env);
        return forkIt(commandLine, cr);
    }
View Full Code Here

Examples of org.jnode.shell.CommandRunner

     *
     * @param args
     */
    public static void main(String[] args) {
        Link cl = Isolate.getLinks()[0];
        CommandRunner cr;
        try {
            ObjectLinkMessage message = (ObjectLinkMessage) cl.receive();
            cr = (CommandRunner) message.extract();
            Map<String, String> env = cr.getEnv();
            int envSize = (env == null) ? 0 : env.size();
            byte[][] binEnv = new byte[envSize * 2][];
            if (envSize > 0) {
                int i = 0;
                for (Map.Entry<String, String> entry : env.entrySet()) {
                    binEnv[i++] = entry.getKey().getBytes();
                    binEnv[i++] = entry.getValue().getBytes();
                }
            }
            NativeProcessEnvironment.setIsolateInitialEnv(binEnv);
        } catch (Exception e) {
            Unsafe.debugStackTrace(e.getMessage(), e);
            return;
        }
        cr.run();
    }
View Full Code Here

Examples of org.springframework.boot.cli.command.CommandRunner

   */
  protected void doMain(String[] args) {
    System.setProperty("java.awt.headless", Boolean.toString(true));
    LogbackInitializer.initialize();

    CommandRunner runner = new CommandRunner(getMainCommandName());
    runner.addCommand(new HelpCommand(runner));

    for (Command command : commands) {
      runner.addCommand(command);
    }
    runner.setOptionCommands(HelpCommand.class, VersionCommand.class);

    int exitCode = runner.runAndHandleErrors(args);
    handleRunnerExitCode(runner, exitCode);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.