public class Test 
{
public static void main(String[] args) 
{
try{
Runtime r=Runtime.getRuntime();
Process p=null;
p=r.exec("explorer http://www.csdn.net");
}
catch(Exception e){
System.out.println("ioexception");
}
}
}

解决方案 »

  1.   

    the code above is for windows
      

  2.   

    是要在ACTIONPERFORMED里面用  try 这段程序吗, 用不用runnable 接口呢
      

  3.   

    可以用下面两个重载的方法this.getAppletContext().showDocument(URL url)
    this.getAppletContext().showDocument(URL url,String target)
      

  4.   

    同上
    AppletContext appletcontext = applet.getAppletContext();
            URL url = null;
            try
            {
                url = new URL(s);
            }
            catch(MalformedURLException malformedurlexception)
            {
                DisplayMsg(malformedurlexception.getMessage());
            }
            appletcontext.showDocument(url, "_self");