0

Version : STS 3.7.2

Issue : Java program not making internet call out. I am behind proxy and I have below configuration too. (Also from STS, I can search market place on internet. so that is confusing like why java cant connect on internet via proxy)

I have manual proxy configured for http and https and sock disabled too.

I also tried running with following vm argument but didnt help. Somehow it seems not using proxy at all. I have seen flood of posts on this, but none of the solution worked for me.

-Dhttp.proxyHost=<myproxyserver> -Dhttp.proxyPort=8080 -Dhttp.proxyUser=<userid> -Dhttp.proxyPassword=<userpwd>

(My java program tries to make http call on port 80 on internet.)

Please help.

Jim Garrison
  • 85,615
  • 20
  • 155
  • 190
user3444718
  • 1,485
  • 6
  • 22
  • 32
  • try using [apache http componenets](https://hc.apache.org) and examples [here](http://stackoverflow.com/questions/6962047/apache-httpclient-4-1-proxy-authentication). also you may find [this](http://stackoverflow.com/a/1433296/2174382) useful – guleryuz Feb 14 '16 at 21:11
  • Thanks for reply but that will not work for me as we already have code..which uses RestTemplate...and working fine when I point it to internal endpoints.( I have CI servers on aws where I want to connect.) – user3444718 Feb 14 '16 at 21:39
  • sts is an eclipse based tool. eclipse's proxy configuration does not have an effect on your code that is trying to connect to internet. they are two different virtual machines (eclipse and your code). you may try to find any spring configuration to use proxy, if you don't want/cannot change the code – guleryuz Feb 14 '16 at 22:02

0 Answers0