|Home >> All >> gnu >> [ getopt Javadoc ]|
gnu.getopt: Javadoc index of package gnu.getopt.
Getopt: This is a Java port of GNU getopt, a class for parsing command line arguments passed to programs. It it based on the C getopt() functions in glibc 2.0.6 and should parse options in a 100% compatible manner. If it does not, that is a bug. The programmer's interface is also very compatible. To use Getopt, create a Getopt object with a argv array passed to the main method, then call the getopt() method in a loop. It will return an int that contains the value of the option character parsed from the command line. When there are no more options to be parsed, it returns -1. A command line option can be ...
LongOpt: This object represents the definition of a long option in the Java port of GNU getopt. An array of LongOpt objects is passed to the Getopt object to define the list of valid long options for a given parsing session. Refer to the getopt documentation for details on the format of long options.