I am trying to use Java cli commanlineparser to parse the follwing arguments,
java -OC:\mydirectory -NMyfile
Option -O is for directory and -N is for the name of file.
I have been looking online but couldnt find a good example and this is what I am trying to do,
Option option = new Option()
option.addOpton("O",true, "output directory)
option.addOpton("N",true, "file name)
...
CommandLineParser parser = new BasicParser();
...
if (cmd.hasOption("O")
...
Basically, I am trying to add multiple options and be able to parse them. Is this correct way to run the program with above options?
Thanks.