File resultsDir = experiment.getResultDirectory();
File resultsDir = null; if (experiment == null) resultsDir = csmart.getResultDir(); else resultsDir = experiment.getResultDirectory();
  private void showExcelFile() {    File resultsDir = experiment.getResultDirectory();    if (resultsDir == null) {        JOptionPane.showMessageDialog(this, "No Results (Metrics) Directory for Experiment",  				    "No Results Directory",   				    JOptionPane.WARNING_MESSAGE);        return;    }    resultsDir = new File(resultsDir, experiment.getExperimentName());    JFileChooser fileChooser = new JFileChooser(resultsDir);    fileChooser.setFileFilter(new MyFileFilter(experiment));    int result = fileChooser.showOpenDialog(this);    if (result != JFileChooser.APPROVE_OPTION)       return;    if (fileChooser.getSelectedFile().isDirectory())      return; // user specified a directory, not a file    String filePathName = fileChooser.getSelectedFile().getPath();    String excel =       Parameters.findParameter("org.cougaar.tools.csmart.excelpath");        if (excel == null || excel.equals("")) {      if(log.isErrorEnabled()) {        log.error("Excel location not specified");      }      return;    }        String[] cmds = { excel, "" };    if(log.isInfoEnabled()) {      log.info("Launching excel from: " + cmds[0]);    }    cmds[1] = filePathName;    try {      process = Runtime.getRuntime().exec(cmds);    } catch (Exception e) {      if(log.isErrorEnabled()) {        log.error("Analyzer: exception: ", e);      }    }  }