Eclipse 未通过代理连接到互联网

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11539681/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 18:36:57  来源:igfitidea点击:

Eclipse not connecting to internet via proxy

eclipseproxyjava

提问by Saurabh

My eclipse(juno 4.2, centos 5.6) doesn't connect to internet. At all. I have a proxy server setup.

我的 eclipse(juno 4.2,centos 5.6)无法连接到互联网。在所有。我有一个代理服务器设置。

I had a look at Eclipse can not connect to internetand at various other questions. So, at the moment, my eclipse.ini file looks like this:

我查看了Eclipse 无法连接到互联网以及其他各种问题。因此,目前,我的 eclipse.ini 文件如下所示:

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
-Dhttp.proxyHost=192.168.1.21
-Dhttp.proxyPort=3128
-Dhttp.nonProxyHosts=localhost|127.0.0.1
-Djava.net.preferIPv4Stack=true
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20120522-1813
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Xms40m
-Xmx512m

I also tried setting proxy server values in the preferences(preferences/Network Connections) - set the HTTP, HTTPS, SOCKS host, port & credentials. But none of the Active Provider settings(Manual, Native, Direct) work for me.

我还尝试在首选项(首选项/网络连接)中设置代理服务器值 - 设置 HTTP、HTTPS、SOCKS 主机、端口和凭据。但是没有一个 Active Provider 设置(手动、本机、直接)对我有用。

I've spent enough time on this to know that I need help. Badly. :P

我已经花了足够的时间在这上面知道我需要帮助。糟糕。:P

So, here I am...help!!

所以,我来了……救命!!

采纳答案by Saurabh

I was able to do this through the preferences UI, under the 'Network Connection' section. I had to set 'Active Provider' to 'Manual' & then provide proxy server details below that.

我可以通过“网络连接”部分下的首选项 UI 执行此操作。我必须将“Active Provider”设置为“Manual”,然后在其下方提供代理服务器详细信息。

回答by eth3rn4l

This post (Eclipse Kepler not connecting to internet via proxy) suggests that you shouldn't set (or you should reset to blank) the SOCKS proxy for the network connection to actually work. Did you try this ?

这篇文章(Eclipse Kepler not connected to internet via proxy)建议您不应该设置(或者您应该重置为空白)SOCKS 代理以使网络连接实际工作。你试过这个吗?

EDIT : maybe I'm a tad late :) But it still could work for other people

编辑:也许我有点晚了 :) 但它仍然适用于其他人

回答by blueferry

For those who are still facing this problem after using cntlm and socks settings; your anti virus program may be the cause. I tried every suggestion I found, however I could not connect to the internet in marketplace (i.e. When I activated cntlm I could connect to the internet using web browser, but cannot connect through eclipse or maven). Then figured out anti virus program was blocking.

对于那些使用cntlm和socks设置后仍然面临这个问题的人;您的防病毒程序可能是原因。我尝试了我发现的所有建议,但是我无法连接到市场中的互联网(即,当我激活 cntlm 时,我可以使用网络浏览器连接到互联网,但无法通过 eclipse 或 maven 连接)。然后发现防病毒程序被阻止了。