Utility for processing command Simple command line processing. This class provides functionality for parsing command line arguments that is coded over and over again in main methods. The model is that command line arguments have the form:
option_args* free_form
where each element in option_args is an option starting with a '-' character and each element in free_form is a string. Option arguments have the syntax:
'-'NAME[=VALUE]
where NAME is the option identifier and VALUE is the string argument for that option.
An example use of the class is as follows:
static void main(String[] args) { Arguments cl = new Arguments(); cl.parse(args); if (cl.getOption("verbose") != null) ... ; String file = cl.getArgument(0); String path = cl.getOption("classpath");
@author Jan Vitek