src/main/java/org/deephacks/tools4j/cli/CliMain.java
public void run() throws RuntimeException {
        if (terminalArgs == null) {
            terminalArgs = new String[0];
        }
        p = GNUishParser.parse(terminalArgs);
        readCommands();
        if (p.getCommand() == null || "".equals(p.getCommand())) {
            Utils.printAvailableCommandsHelp(commands);
            return;
        }

        final Command cmd = commands.get(p.getCommand());
        if (cmd == null) {
            throw CliException.COMMAND_NOT_FOUND(p.getCommand());
        }
        if (p.help()) {
            Utils.printCommandHelp(cmd);
            return;
        }
        try {
            cmd.execute(p);
        } catch (Exception e) {
            if (p.debug()) {
                e.printStackTrace();
            }
            if (e instanceof RuntimeException) {
                throw (RuntimeException) e;
            }
        }
    }
public void run() throws RuntimeException {
        if (terminalArgs == null) {
            terminalArgs = new String[0];
        }
        p = GNUishParser.parse(terminalArgs);
        readCommands();
        if (p.getCommand() == null || "".equals(p.getCommand())) {
            Utils.printAvailableCommandsHelp(commands);
            return;
        }

        final Command cmd = commands.get(p.getCommand());
        if (cmd == null) {
            throw CliException.COMMAND_NOT_FOUND(p.getCommand());
        }
        if (p.help()) {
            Utils.printCommandHelp(cmd);
            return;
        }
        try {
            cmd.execute(p);
        } catch (Exception e) {
            if (p.debug()) {
                e.printStackTrace();
            }
            if (e instanceof RuntimeException) {
                throw (RuntimeException) e;
            }
        }
    }
public void run ( ) throws RuntimeException { if ( terminalArgs == null ) { terminalArgs = new String [ 0 ] ; } p = GNUishParser . parse ( terminalArgs ) ; readCommands ( ) ; if ( p . getCommand ( ) == null || "" . equals ( p . getCommand ( ) ) ) { Utils . printAvailableCommandsHelp ( commands ) ; return ; } final Command cmd = commands . get ( p . getCommand ( ) ) ; if ( cmd == null ) { throw CliException . COMMAND_NOT_FOUND ( p . getCommand ( ) ) ; } if ( p . help ( ) ) { Utils . printCommandHelp ( cmd ) ; return ; } try { cmd . execute ( p ) ; } catch ( Exception e ) { if ( p . debug ( ) ) { e . printStackTrace ( ) ; } if ( e instanceof RuntimeException ) { throw ( RuntimeException ) e ; } } }
Start evaluating the user input and eventually execute the command
requested by the user.

@throws RuntimeException Any runtime exceptions thrown by either this
library or user commands will fall through and thrown from this method.
Start evaluating the user input and eventually execute the command requested by the user .