title: Java Cli CommandLineParser
body: <p>I am trying to use Java cli commanlineparser to parse the follwing arguments,</p>
  
  <pre><code>java -OC:\mydirectory -NMyfile
  </code></pre>
  
  <p>Option -O is for directory and -N is for the name of file.</p>
  
  <p>I have been looking online but couldnt find a good example and this is what I am trying to do,</p>
  
  <pre><code>Option option = new Option()
  option.addOpton("O",true, "output directory)
  option.addOpton("N",true, "file name)
  ...
  CommandLineParser parser = new BasicParser();
  ...
  if (cmd.hasOption("O")
  ...
  </code></pre>
  
  <p>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?</p>
  
  <p>Thanks.</p>