}
@Override
public void run() {
Parameter.createTempDirectory();
ProgressBar progressBar = new ProgressBar(UICaption.progress_caption_run_blast, UICaption.progress_label_run_blast, true);
progressBar.setVisible(true);
try {
Process proc;
BufferedReader stderr;
String line;
proc = Runtime.getRuntime().exec(cmd1.toString());
stderr = new BufferedReader(new InputStreamReader(proc.getErrorStream()));
while ((line = stderr.readLine()) != null) {
System.out.println(line);
}
proc = Runtime.getRuntime().exec(cmd2.toString());
stderr = new BufferedReader(new InputStreamReader(proc.getErrorStream()));
while ((line = stderr.readLine()) != null) {
System.out.println(line);
}
proc.waitFor();
progressBar.setLabelAntTitle(UICaption.progress_label_parse_blast, UICaption.progress_caption_parse_blast);
new Thread(new BlastParser(oPath, document)).start();
} catch (IOException e) {
JOptionPane.showMessageDialog(null, UICaption.dialog_exception_runtime_exec, UICaption.dialog_caption_error, JOptionPane.ERROR_MESSAGE);
return;
} catch (InterruptedException e) {
JOptionPane.showMessageDialog(null, UICaption.dialog_exception_runtime_exec, UICaption.dialog_caption_error, JOptionPane.ERROR_MESSAGE);
return;
} finally {
progressBar.dispose();
}
}