public class dddd {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
Runtime run = Runtime.getRuntime();
Process pro = run.exec("cmd /c start tclsh85 e:dddd.tcl");
//Process pro = run.exec("cmd /c start dir");
//Process pro = run.exec("cmd /c ");
BufferedReader br = new BufferedReader(new InputStreamReader(pro.getInputStream()));
String str = "";
br.readLine();
while((str = br.readLine()) != null) {
System.out.println("str="+str);
}
br.close();
pro.destroy();
}
}
运行这段代码怎么没输出,没有报异常,但在dos下有输出