waitFor()

來源: 2005-01-25 08:31:18 [舊帖] [給我悄悄話] 本文已被閱讀:

I have the following code to kick-off another thread named MSA.

try {
Process proc = Runtime.getRuntime().exec("../clustalwModified/MSA");
} catch (Exception e) {}

I want to put the current thread on hold till MSA has finished. I know that I need to use "waitFor()", but where exactly should I put it?

Thank you