Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Basic Apache Commons CLI usage

Header Image

  1. Creating a parser
    • This article covers how to create a command line parser object and add options to it using Apache Commons CLI, with examples and explanations of each step along the way.
  2. Parsing command line arguments
    • This article covers the basics of parsing command-line arguments using Apache Commons CLI, including how to create a parser, add options, parse arguments, retrieve option values, and handle errors.
  3. Getting option values
    • This article explains how to retrieve option values from the parsed command line and handle missing option values using Apache Commons CLI in Java applications, with code examples and humor.
  4. Handling errors
    • This article covers how to handle errors during parsing and provides information on error reporting and logging in Apache Commons CLI for developing robust and reliable command-line applications.

Table of contents