打开IE:
Runtime.exec("iexplore");
打开指定url:
Runtime.exec("cmd /c start "+url);
或Runtime.exec("iexplore "+url);
Runtime.exec("iexplore");
打开指定url:
Runtime.exec("cmd /c start "+url);
或Runtime.exec("iexplore "+url);
解决方案 »
- public static final String的问题
- gif资源文件已经与*.java文件放在同目录中,为什么还是需要写完绝对路径才可用?
- l o g 4 j输出的疑问啊
- 关于java读文件的问题,请教
- 关于数据在内存中的情况?
- java socket和c通信时丢失数据是什么原因?
- JTextPane只能用inserComponent插入component吗,那么如何把component添加到JTextPane的后面?
- 不再用到的对象要置成null,请举个例子
- 各位朋友,给我一个在jbuilder7 或jbuilder6中支持鼠标滚轮的补丁吧!
- 大佬们请帮帮我没有思路啊
- 在线求救!!!在线求救!!!在线求救!!!在线求救!!!
- @@@@@@@@在java代码(非jsp)中怎么调用javabean........@@@@@@@
"C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "X", "Y", "Z"};
for (int i = 0; i < driver.length; i++) {
try {
Runtime.getRuntime().exec(
driver[i] + ":\\Program Files\\Internet Explorer\\IEXPLORE.EXE " +
url);
System.exit(0);
}
catch (Exception ex) {
pub pub = new pub();
pub.saveLog(this.toString() + ex.toString());
}
}这里有打开的代码,通过运行IEXPLORE.EXE 打开ie,由于不知道windows装在那个盘,所以遍历了很多。