Код:
public boolean runProgramAndWait(String runCommand){
Process process;
java.lang.Runtime runtime;
try{
runtime = Runtime.getRuntime();
process = runtime.exec(runCommand);
process.waitFor();
return true;
}catch (InterruptedException e){
return false;
}
catch (Exception e){
return false;
}
}
Вот так должно работать.