import java.lang.*;Runtime rt=Runtime.getRuntime();
rt.exec("C:\\Program Files\\Iexplorer\Iexplorer.exe","http://www.csdn.net");

解决方案 »

  1.   

    public class TestExe
    {
    public static void main(String argv[])
    {
    try
    {
    java.lang.Process pro=java.lang.Runtime.getRuntime().exec("C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE");
    }
    catch(Exception e)
    {
    System.out.println(e.getMessage());
    }
    }
    }
      

  2.   

    try {
            Runtime.getRuntime().exec("Rundll32.exe url.dll, FileProtocolHandler " + "index.html"); //在Windows平台上运行系统默认Web浏览器打开帮助页面
          } catch (Exception ex) {
            System.out.println(ex);
          }在win2000上通过,用和.html关联的浏览器打开叶面
      

  3.   

    import java.awt.*;
    import java.awt.event.*;
    import java.applet.Applet;
    import java.net.*;
    import java.applet.AppletContext;
    public class MyApp extends Applet
    {
    public void init(){
       Button b = new Button("http://www.javasoft.com/index.html");
       b.addActionListener(new ActionListener(){
           public void actionPerformed(ActionEvent e){
              try{
                 URL url = new URL("http://www.javasoft.com/index.html");
                 System.out.println("http://www.javasoft.com/index.html");
                 getAppletContext().showDocument(url);
              }
              catch(MalformedURLException murl){
                 System.out.println("bad url !");
              }   
           } 
       }); 
          setLayout(new FlowLayout());    
          add(b);
    }
    }
      

  4.   

    import java.lang.*;Runtime rt=Runtime.getRuntime();
    rt.exec("C:\\Program files\\Iexplorer\\Iexplorer.exe","http://www.csdn.net");可能是楼上的笔误,少了个‘\’
      

  5.   

    rt.exec("C:\\Program files\\Iexplorer\\Iexplorer.exe http://www.csdn.net");
    楼上说的也有误啊!