I have a simple command line option set. However, I have not been able to set them up to work. Any help or tips would be appreciated. Here is what my argument options are:
myApp -s -f filename.xml myApp -g [-f filename.xml]
The -s is for silent operation (no gui) and requires -f with a filename at the end the -g is for gui operation and it is optional to attach an xml file.
How should I set this up?
Here is my latest contortion to get it to work. None of them have been successful.
myOptions = new ml.options.Options(args, 0, 1); myOptions.addSet("silent", 0).addOption("s", Multiplicity.ZERO_OR_ONE); myOptions.getSet("silent").addOption("f", false, Separator.BLANK, Multiplicity.ZERO_OR_ONE ); myOptions.addSet("gui", 0).addOption("g", Multiplicity.ZERO_OR_ONE); myOptions.getSet("gui").addOption("f", Multiplicity.ZERO_OR_ONE); OptionSet set = myOptions.getMatchingSet(true, true);
If you have any experience with this tool, please lend me a hand.
Thanks,
Brian
|