@@ -0,0 +1,1320 @@
+package edu.mit.csail.uid;%0A%0Aimport org.apache.commons.cli.*;%0A%0Apublic class CommandArgs %7B%0A   Options _options;%0A%0A   public CommandArgs()%7B %0A      init();%0A   %7D%0A%0A   public CommandLine getCommandLine(String%5B%5D args)%7B%0A      CommandLineParser parser = new PosixParser();%0A      CommandLine cmd = null;%0A      try %7B%0A         cmd = parser.parse( _options, args, false );%0A      %7D%0A      catch( ParseException exp ) %7B%0A         System.out.println( exp.getMessage() );%0A      %7D%0A      return cmd;%0A   %7D%0A%0A   void init()%7B%0A      _options = new Options();%0A      _options.addOption(%22h%22, %22help%22, false, %22print this help message%22);%0A      _options.addOption(%0A            OptionBuilder.withLongOpt(%22run%22)%0A                         .withDescription(%22run .sikuli or .skl file%22)%0A                         .hasArg()%0A                         .withArgName(%22sikuli-file%22)%0A                         .create('r') );%0A      _options.addOption(%0A            OptionBuilder.hasArgs()%0A                         .withLongOpt(%22args%22)%0A                         .withArgName(%22arguments%22)%0A                         .withDescription(%22specify the arguments passed to Jython's sys.argv%22)%0A                         .create() );%0A%0A   %7D%0A%0A   public void printHelp()%7B%0A      HelpFormatter formatter = new HelpFormatter();%0A      formatter.printHelp(%22Sikuli-IDE%22, _options, true );%0A   %7D%0A%7D%0A%0A

add CommandArgs.java