java设置代理

Properties prop = System.getProperties();
prop.setProperty("http.proxyHost", "127.0.0.1");
prop.setProperty("http.proxyPort", "8087");

 

参考:http://www.chahushequ.com/read.bbscs?action=topic&id=402882463a44194b013a4e94fb4d0360&bid=92&fcpage=1&fcaction=index&tagId=0

你可能感兴趣的:(java)