code: public Map<String, String> parseArgs(String[] args) {
  
          Map<String, String> result = new HashMap<String, String>();
          Set<String> allowedKeys = new HashSet<String>(
              Arrays.asList(PARAM_ADDITIONAL, PARAM_SCRIPT, PARAM_REGISTRY_PORT));
          for (String arg : args) {
              if (arg.startsWith("-")) {
                  int eqPos = arg.indexOf("=");
                  if (eqPos >= 0) {
                      String key = arg.substring(1, eqPos);
                      if (!allowedKeys.contains(key)) {
                          wrongUsage();
                      }
                      String val = arg.substring(eqPos + 1);
                      result.put(key, val);
                  } else {
                      wrongUsage();
                  }
              } else {
                  wrongUsage();
              }
          }
          return result;
      }
docs: Validates, parses and returns the command line arguments.<p>
  
  @param args the command line arguments
  @return the map of parsed arguments