Postman can authentication but connection refused from eclipse java

Might be an application specific rule allowing it through.
Check firewall settings like this on Windows 7/Server 2012:

  1. Open Control Panel and search “firewall” (Or if Windows 10 just search “firewall settings” from the start menu).
  2. Click “Windows Firewall” and open the “Advanced Settings”.
  3. Go to “Outbound Rules” and check there for rules on Remote Port 443…

You could also create a new rule allowing the connection

Also, does that exact same request structure work in postman?

Lastly, have a read of this post and see if any of those links can assist you as well: