各位高人,怎样设置一个JButton的事件,使得用默认浏览器(ie或者firefox),打开一个已经储存的网页呢?

解决方案 »

  1.   

    Process p=Runtime.getRuntime().exec("explorer http://www.csdb.net");
      

  2.   

    Runtime.getRuntime().exec("cmd /c start http://www.csdb.net");
      

  3.   

    try {
                String str = "E:\\java-api\\index.html";
                Runtime.getRuntime().exec("explorer " + str);
            }
            catch (IOException ex) {
                ex.printStackTrace();
            }
      

  4.   

    现在已经可以打开一个储存为htm格式的ppt了,效果很好,但是刚打开时,是大纲视图,非要点那个幻灯片放映,才能全屏浏览,那怎么一打开就是全屏模式呢?我试了ppt储存时的设置,可就是没有这个设置。晕啊。