当前位置:编程学习 > JAVA >>

用Java打开网页

import java.io.IOException;


public class test1 {
 public static void login(){
  Runtime rt = Runtime.getRuntime();
  try {


  rt.exec("rundll32   url.dll,FileProtocolHandler   " + "http://www.baidu.com");


  } catch (IOException e) {


  }


 }
 public static void main(String[] args) {
  login( );
 }
}

补充:移动开发 , Android ,
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,