【发布时间】:2023-03-05 17:20:02
【问题描述】:
我正在尝试让我在 Eclipse 中的 Java 代码通过经过身份验证的代理访问 Internet。我的代码只是使用http://docs.oracle.com/javase/tutorial/networking/urls/readingURL.html阅读网站源代码
我收到此错误:
线程“主”java.net.ConnectException 中的异常:连接超时:连接
以下是我已经尝试过的事情: - 在首选项中,设置 HTTP 和 HTTPS 代理,清除 SOCKS,然后转到手动 - 在 Eclipse.ini 中,添加
-Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient
-Dhttp.proxyPort=8080
-Dhttp.proxyHost=XXX
-Dhttp.proxyUser=XXX
-Dhttp.proxyPassword=XXX
-Dhttp.nonProxyHosts=localhost|127.0.0.1
【问题讨论】:
-
您知道是
-Dhttp.proxyHost而不是Dhttp.proxyHost? -
@ThorbjørnRavnAndersen 是的,我知道,现在编辑到我的帖子中
标签: java eclipse authentication proxy