Java 启动IE浏览器打开指定网页

来源:互联网 发布:基于php的旅游网站 编辑:程序博客网 时间:2024/05/14 19:18

package web;

import java.io.IOException;

public class IE {

public static void main(String[] args) throws IOException{        String str = "cmd /c start iexplore http://localhost:8080/web/index.html";    try {        Runtime.getRuntime().exec(str);    } catch (IOException e) {        e.printStackTrace();    }} 

}

0 0