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

Runtime.getRuntime().exec(command);如何使用相对exe路径
有一个update.exe文件和class文件在同一个目录下

Process proc = Runtime.getRuntime().exec("update.exe");

我想这样调用这个和class文件在一个目录下的exe文件  

但是他说  
Java code

java.io.IOException: Cannot run program "update.exe": CreateProcess error=2, The system cannot find the file specified


也就是没有找到  

我想请问如何调用相对目录的exe文件

谢谢

------解决方案--------------------
1 你的package是啥?
2 当前目录是哪里?