public void setOptions(String[] options) throws Exception {
    String	tmpStr;
    
    setRawOutput(Utils.getFlag('D', options));
    setRandomizeData(!Utils.getFlag('R', options));

    tmpStr = Utils.getOption('O', options);
    if (tmpStr.length() != 0)
      setOutputFile(new File(tmpStr));

    tmpStr = Utils.getOption("dir", options);
    if (tmpStr.length() > 0)
      setTestsetDir(new File(tmpStr));
    else
      setTestsetDir(new File(System.getProperty("user.dir")));

    tmpStr = Utils.getOption("prefix", options);
    if (tmpStr.length() > 0)
      setTestsetPrefix(tmpStr);
    else
      setTestsetPrefix("");

    tmpStr = Utils.getOption("suffix", options);
    if (tmpStr.length() > 0)
      setTestsetSuffix(tmpStr);
    else
      setTestsetSuffix(DEFAULT_SUFFIX);
    
    tmpStr = Utils.getOption("find", options);
    if (tmpStr.length() > 0)
      setRelationFind(tmpStr);
    else
      setRelationFind("");
    
    tmpStr = Utils.getOption("replace", options);
    if ((tmpStr.length() > 0) && (getRelationFind().length() > 0))
      setRelationReplace(tmpStr);
    else
      setRelationReplace("");
    
    tmpStr = Utils.getOption('W', options);
    if (tmpStr.length() == 0)
      throw new Exception("A SplitEvaluator must be specified with the -W option.");
    
    // Do it first without options, so if an exception is thrown during
    // the option setting, listOptions will contain options for the actual
    // SE.
    setSplitEvaluator((SplitEvaluator)Utils.forName(SplitEvaluator.class, tmpStr, null));
    if (getSplitEvaluator() instanceof OptionHandler)
      ((OptionHandler) getSplitEvaluator()).setOptions(Utils.partitionOptions(options));
  }