O'Reilly logo

Apache Jakarta Commons: Reusable Java™ Components by Will Iverson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13. CLI (Command-Line Interface)

The Apache Jakarta Commons CLI package is intended to assist in the creation of command-line applications. In conjunction with the String manipulation afforded by the Commons Lang package, aspiring developers could potentially create quite sophisticated console applications. This package takes care of the complexities of parsing incoming arguments, validating the arguments, and displaying help information.

In this chapter, a simple utility function (searching various paths for the location(s) of a particular class file) is first presented from a high level, then a command-line wrapper based on this utility using CLI is shown, and for completeness, the full implementation of the class search tool is presented. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required