I'm new to Apache Commons CLI 1.5.0 and having trouble with the following problem. I need to
Fantastic news! We've Found the answer you've been seeking!
Question:
I'm new to Apache Commons CLI 1.5.0 and having trouble with the following problem.
I need to create two options r and g. The r flag needs to take in two strings, old and new, and replaces the old string with the new string in a given input file. The g flag can only be used with the r flag and replaces all occurrences of the old with new.
So g flag is dependent on r and should error out when g is used without the r flag.
The syntax would look like this:
tool -r 123 345 -g
I'm a bit lost here. How do I configure commons-cli to handle the options above?
Related Book For
Operations Management
ISBN: 978-0132687584
1st Canadian Edition
Authors: Jay Heizer, Barry Render, Paul Griffin
Posted Date: