首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

JAVA运用代理服务器访问网络资源

2012-12-18 
JAVA使用代理服务器访问网络资源需要在使用URL访问网络资源前,加入下面的代码。?System.getProperties().pu

JAVA使用代理服务器访问网络资源

需要在使用URL访问网络资源前,加入下面的代码。

?

System.getProperties().put("proxySet", "true");  //使用代理服务器System.getProperties().put("proxyHost", "192.168.1.1");  //代理服务器IPSystem.getProperties().put("proxyPort", "8080");  //代理服务器端口

?

参考资料:http://xttifqqk.iteye.com/blog/602765

热点排行