Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler http://www.sina.com.cn");
解决方案 »
- Timer 来定时重复执的问题
- 被正则表达式输出结果弄晕了
- jfreeChart时序图横轴标尺值只显示奇数天,不能显示一个月的所有天数?
- 关于输出的一个问题,谢谢
- String 的疑问!!!
- socket接收数据的问题,请大家指教???
- 一个菜鸟的问题:Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld
- 求解:有一个jar文件,我用什么解开它,使他展开,然后在运行?
- scjp有多大份量?
- JDK1.2.1的一个小问题
- 解决马上给分!!!
- 欢迎大家加入我的群"华南软件技术基地",群QQ为8373474,一起提高啊
Runtime rt = Runtime.getRuntime();
try {
Process p = rt.exec("C:/Program Files/Internet Explorer/iexplore "
+ myURL);
p.waitFor();
} catch (Exception E) {
System.out.println(E.getMessage());
E.printStackTrace();
}其中使用了绝对地址。
Runtime.getRuntime().exec("explorer.exe http://www.sina.com.cn");
Runtime run = Runtime.getRuntime();
run.exec("c:\\Program Files\\Internet Explorer\\IEXPLORE.EXE http://www.sina.com.cn");
}catch(Exception e){
System.out.println(e.getMessage());
}
Runtime run = Runtime.getRuntime();
run.exec("mozilla http://www.sina.com.cn");
}catch(Exception e){
System.out.println(e.getMessage());
}
这种写法没用过,有什么不同和优点么?
举个例子
//打开控制面板的"日期和时间"
rundll32.exe shell32.dll,Control_RunDLL timedate.cpl rundll user,exitwindowsexec
...
to:bluesmile979(笑着) 请问在Mac下面怎么做呀?我这几个平台的都要用,谢谢了
学习ing
谢谢楼上得各位大哥,大姐得不吝赐教
谢谢楼主得问题