java调用exe资料
java调用exe文件
为什么调用1.exe的时候程序会卡到那里
------解决方案--------------------
改为Process process = Runtime.getRuntime().exec("cmd /c start D:/1.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");试试呢