Code to set an HTTP proxy in Java methods

The development process of content to be a good number of collections, the following information about the contents of the method set an HTTP proxy in Java, hoping to have the use of small partners.
. System.getProperties () PUT ( "http.proxyHost", "someProxyURL");
System.getProperties () PUT ( "and http.proxyPort", "someProxyPort");.
. System.getProperties () PUT ( "http.proxyUser "," someUserName ");
System.getProperties () PUT (." http.proxyPassword "," somePassword ");




 

Guess you like

Origin www.cnblogs.com/Dragofly/p/11248114.html