日期:2014-05-20  浏览次数:20655 次

java调用exe文件
import java.io.IOException;


public class Te {

/**
 * @param args
 * @throws IOException 
 * @throws IOException 
 * @throws InterruptedException 
 */
public static void main(String[] args) throws IOException, InterruptedException {
// TODO Auto-generated method stub
Process process = Runtime.getRuntime().exec("D:/1.exe"); 
process.waitFor( );
}
}

为什么调用1.exe的时候程序会卡到那里

------解决方案--------------------
改为Process process = Runtime.getRuntime().exec("cmd /c start D:/1.exe");试试呢