设置代理服务器

类别:Java 点击:0 评论:0 推荐:

 //使用JVM参数设置这个属性,例如:-DproxyServerHost=10.1.22.175 -DproxyServerPort=1080

 if(System.getProperty("proxyServerHost")!=null)
   {
  props.put("socksProxyHost",System.getProperty("proxyServerHost"));
   }

 if(System.getProperty("proxyServerPort")!=null)
   {
  props.put("socksProxyPort",System.getProperty("proxyServerPort"));
   }

本文地址:http://com.8s8s.com/it/it15492.htm