Source:
public static void main(@Nonnull String[] args) { try { CLILogConfiguration.setupLogs(); } catch (LogConfigurationException e) { System.err.println("Failed to setup logs: " + e.getMessage()); System.exit(ExitStatus.FAILURE_USAGE); } if (args.length == 0) { System.err.println("Try --help for help."); System.exit(ExitStatus.SUCCESS); } try { TokenIterator iterator = new TokenIterator(new NoLocation(), args); List<String> list = new ArrayList<String>(); while (iterator.hasNext()) { list.add(iterator.next()); } Options options = parseCommandLine(list); if (options.askForHelp()) { printUsage(System.out); System.exit(ExitStatus.SUCCESS); } if (options.askForPropertiesHelp()) { printHelpProperties(System.out, options); System.exit(ExitStatus.SUCCESS); } if (options.askForVersion()) { printVersion(System.out, options); System.exit(ExitStatus.SUCCESS); } if (options.askForPluginsList()) { printPluginsList(System.out, options); System.exit(ExitStatus.SUCCESS); } System.exit(runJack(System.err, options)); } catch (CmdLineException e) { System.err.println(e.getMessage()); CmdLineParser parser = e.getParser(); if (parser != null) { printUsage(System.err); } else { System.err.println("Try --help for help."); } System.exit(ExitStatus.FAILURE_USAGE); } catch (CannotReadException | WrongPermissionException | NotFileOrDirectoryException | NoSuchFileException e) { System.err.println(e.getMessage()); System.exit(ExitStatus.FAILURE_USAGE); } catch (IOException e) { System.err.println(e.getMessage()); System.exit(ExitStatus.FAILURE_USAGE); } catch (IllegalOptionsException e) { System.err.println(e.getMessage()); System.exit(ExitStatus.FAILURE_USAGE); } }

Target:
public static void main(@Nonnull String[] args) { try { CLILogConfiguration.setupLogs(); } catch (LogConfigurationException e) { System.err.println("Failed to setup logs: " + e.getMessage()); System.exit(ExitStatus.FAILURE_USAGE); } if (args.length == 0) { System.err.println("Try --help for help."); System.exit(ExitStatus.SUCCESS); } try { TokenIterator iterator = new TokenIterator(new NoLocation(), args); List<String> list = new ArrayList<String>(); while (iterator.hasNext()) { list.add(iterator.next()); } Options options = parseCommandLine(list); if (options.askForHelp()) { printUsage(System.out); System.exit(ExitStatus.SUCCESS); } if (options.askForPropertiesHelp()) { printHelpProperties(System.out, options); System.exit(ExitStatus.SUCCESS); } if (options.askForVersion()) { printVersion(System.out, options); System.exit(ExitStatus.SUCCESS); } if (options.askForPluginsList()) { printPluginsList(System.out, options); System.exit(ExitStatus.SUCCESS); } System.exit(runJack(System.err, options)); } catch (CmdLineException e) { System.err.println(e.getMessage()); CmdLineParser parser = e.getParser(); if (parser != null) { printUsage(System.err); } else { System.err.println("Try --help for help."); } System.exit(ExitStatus.FAILURE_USAGE); } catch (IOException | CannotReadException | WrongPermissionException | NotFileOrDirectoryException | NoSuchFileException e) { System.err.println(e.getMessage()); System.exit(ExitStatus.FAILURE_USAGE); } catch (IllegalOptionsException e) { System.err.println(e.getMessage()); System.exit(ExitStatus.FAILURE_USAGE); } }