【发布时间】:2015-08-12 17:45:47
【问题描述】:
我可以使用 java 应用程序在我的 Windows 7 中设置/更改代理设置吗?
我正在尝试使用:
public static void setProxy(String proxyUrl, String proxyPort){
System.getProperties().put("proxySet", "true");
System.getProperties().put("http.proxyHost", proxyUrl);
System.getProperties().put("http.proxyPort", proxyPort);
}
但运行后我的设置并没有改变,而且我的 IP 与以前相同。
【问题讨论】: