public static void main(final String[] args) throws Exception {
        final AclTool tool = new AclTool(new DefaultCLIToolLogger());
        tool.setShouldExit(true);
        int exitCode = 1; //pessimistic initial value

        try {
            tool.run(args);
            exitCode = 0;
        } catch (OptionsPrompt e) {
            exitCode = 2;
            tool.error(e.getMessage());
            tool.error(e.getPrompt());
            if (tool.argVerbose) {
                e.printStackTrace();
            }
        } catch (CLIToolOptionsException e) {
            exitCode = 2;
            tool.error(e.getMessage());
            if (tool.argVerbose) {
                e.printStackTrace();
            }
        } catch (Throwable e) {
            if (e.getMessage() == null || tool.argVerbose) {
                e.printStackTrace();
            }
            tool.error("Error: " + e.getMessage());
        }
        tool.exit(exitCode);
    }
public static void main ( final String [ ] args ) throws Exception { final AclTool tool = new AclTool ( new DefaultCLIToolLogger ( ) ) ; tool . setShouldExit ( true ) ; int exitCode = 1 ; try { tool . run ( args ) ; exitCode = 0 ; } catch ( OptionsPrompt e ) { exitCode = 2 ; tool . error ( e . getMessage ( ) ) ; tool . error ( e . getPrompt ( ) ) ; if ( tool . argVerbose ) { e . printStackTrace ( ) ; } } catch ( CLIToolOptionsException e ) { exitCode = 2 ; tool . error ( e . getMessage ( ) ) ; if ( tool . argVerbose ) { e . printStackTrace ( ) ; } } catch ( Throwable e ) { if ( e . getMessage ( ) == null || tool . argVerbose ) { e . printStackTrace ( ) ; } tool . error ( "Error: " + e . getMessage ( ) ) ; } tool . exit ( exitCode ) ; }
Creates an instance and executes {@link #run(String[])}.

@param args command line arg vector

@throws Exception action error