黑马程序员技术交流社区
标题:
Runtiem 小问题
[打印本页]
作者:
唐志海
时间:
2014-1-11 18:22
标题:
Runtiem 小问题
public class RuntimeDemo
{
public static void main(String[] args)throws Exception
{
Runtime r=Runtime.getRuntime() ;
r.exec("iexplore.exe");
}
}
复制代码
为什么我打不开IE的程序呢?(Cannot run program "iexplore.exe": CreateProcess error=2, ?????????)
作者:
yaohsieh
时间:
2014-1-11 18:38
public class RuntimeDemo {
public static void main(String[] args) throws Exception {
Runtime r = Runtime.getRuntime();
r.exec("C:\\Program Files\\Internet Explorer\\iexplore.exe");
}
}
复制代码
iexplore.exe不是system32下面的,修改为全路径就好了
作者:
淡夜清风
时间:
2014-1-11 18:45
路径问题,改为r.exec("C:\\Program Files\\Internet Explorer\\iexplore.exe");
作者:
唐志海
时间:
2014-1-11 18:57
yaohsieh 发表于 2014-1-11 18:38
iexplore.exe不是system32下面的,修改为全路径就好了
可是不是默认路径要是没找到的话查找其他路径啊
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/)
黑马程序员IT技术论坛 X3.2