import java.lang.*;
public class TestExec{
public static void main(String args[])
{
try{
Process pro = Runtime.getRuntime().exec("explorer http://localhost");
        }
catch(Exception ex){
System.out.println("error");
}
  }
}搞定,给分吧,呵呵!

解决方案 »

  1.   

    谢谢,这个现在能出来了,还有个问题:
    我的url是这样的:http://localhost:8080/node.jsp?id=1
    结果弹出窗口:
      路径'1'不存在,或者是无效目录
    这个有解决的方法吗?
      

  2.   

    windows 吗?用start命令start http://www.csdn.net自动调用ie/myie/或者其他系统默认浏览器
      

  3.   

    Runtime.getRuntime().exec("cmd.exe /C start iexplore http://www.csdn.net");
      

  4.   

    谢谢几位了,解决了
    可能用explorer 打开url时对url的解析有问题,用start就可以了