Eclipse not connecting to internet via proxy

2019-05-04 00:01发布

问题:

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

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

-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.

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

So, here I am...help!!

回答1:

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.



回答2:

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 ?

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



回答3:

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.