Before continuing, some explanation of the vocabulary used in this manual is required:
A single (String
) token from the
command line. The JVM will provide an array of these to your
main()
method.
One or more arguments that must be taken together to have meaning. For example, in the command "java -cp myjar.jar MyClass", the arguments "-cp" and "myjar.jar" comprise a single parameter defining the classpath. The argument "MyClass" comprises another parameter indicating the class to load and run.
A single-argument parameter whose presence alone conveys meaning. For example, in the command "java -version", the "-version" switch tells the JVM to print its version information and exit.
A parameter whose content conveys meaning. In the command "java -cp myjar.jar MyClass", the "-cp myjar.jar" parameter is an option, as is the "MyClass" parameter.
An option that is preceded by a "flag" to indicate which option is being set. In the command "java -cp myjar.jar MyClass", the "-cp myjar.jar" option is flagged by "-cp".
An option that is not preceded by a flag, and whose meaning is conveyed by its position in the command line relative to other Unflagged Options. In the command "java -cp myjar.jar MyClass", "MyClass" is an unflagged option.
A combination of Switch
and
FlaggedOption
. It serves the same function as
a Switch
on a command line, but it may be
"qualified" with additional data following a colon. In the
commands "java -verbose MyClass" and
"java -verbose:class MyClass", "verbose"
is a QualifiedSwitch
qualified by the
"class" qualifier in the second example.
A single-character flag preceded by a single dash.
A multi-character flag preceded by a double dash.
A unique identifier assigned by the programmer to each
parameter JSAP
should recognize. A
parameter's ID is seen only by the programmer, and is used to
retrieve its values from the JSAPResult
object.