A shell variable and a JVM system property are different configuration inputs. Exporting http_proxy for curl does not establish http.proxyHost inside a Java URLConnection client.

For a JVM whose participating HTTP connections should use a fixed route, startup arguments can make the choice explicit:

java -Dhttp.proxyHost=203.0.113.10 -Dhttp.proxyPort=8080 \
     -Dhttps.proxyHost=203.0.113.10 -Dhttps.proxyPort=8080 \
     -jar application.jar

The endpoint is illustrative; public HTTP candidates from the HTTP proxy list can fill these fields when the application permits that route. The host property takes a hostname or IP address, with the port supplied separately. It is not a full proxy URL.

Authentication and bypass rules need their own configuration. Do not infer that an undocumented http.proxyPassword property works merely because an old example includes it. Consult the documented authentication API and the networking properties for your JDK.

This applies to participating Java networking paths. A library with an independently configured HTTP client can follow another policy. Identify that client before spending time translating every shell variable into a JVM argument.

Tënë sô zo