} catch (Exception ex) { ex.printStackTrace(); System.err.println(); System.err.println( _getUsage() ); System.exit(1);
pos++; inputPos++; } if (inputPos < 1) { throw new IllegalStateException("Too few arguments");
  private static Properties _getArgs(String args[]) {    Properties rc = new Properties();    String  arg;    int     inputPos  = 0;    int     pos       = 0;    try {      while (pos < args.length) {        arg = args[pos];        if (arg.startsWith("-")) {          if (arg.equals("-id")) {            if (rc.getProperty(RC_NAME) != null) {              throw new IllegalArgumentException(XmlUtils.E_NAME_AND_UUID);            }            rc.setProperty(RC_UUID, args[pos + 1]);            pos += 2;            continue;          }           else if (arg.equals("-name")) {            if (rc.getProperty(RC_UUID) != null) {              throw new IllegalArgumentException(XmlUtils.E_NAME_AND_UUID);            }            rc.setProperty(RC_NAME, args[pos + 1]);            pos += 2;            continue;          }           else if (arg.equals("-relative")) {            rc.setProperty(RC_RELATIVE, "true");            pos++;            continue;          }           else if (arg.equalsIgnoreCase("-includeparent")) {            rc.setProperty(RC_PARENT, "true");            pos++;            continue;          } else {            throw new IllegalArgumentException(XmlUtils.E_UNKNOWN_OPTION + arg);          }        }        switch (inputPos) {        case 0:          rc.setProperty(RC_SUBJ, arg);          break;        case 1:          rc.setProperty(RC_EFILE, arg);          break;        case 2:          rc.setProperty(RC_UPROPS, arg);          break;        case 3:          throw new IllegalArgumentException("Too many arguments - " + arg);        }        pos++;        inputPos++;      }      if (inputPos < 1) {        throw new IllegalStateException("Too few arguments");      }    }     catch (Exception ex) {      ex.printStackTrace();      System.err.println();      System.err.println( _getUsage() );      System.exit(1);    }    return rc;  } // private static Properties _getArgs(args)