I have simple scraping program based on Joint library, that needs to set and change proxy programmaticaly.
private static void setProxy(){
System.setProperty("https.proxyHost", ProxyProducer.getProxy()); // this class just returns host address from list
System.setProperty("https.proxyPort", ProxyProducer.PORT);
ProxyAuthenticator.setCredentials(ProxyProducer.LOGIN, ProxyProducer.PASSWORD); //Joint's authentificator-wrapper
}
But it does not work. No errors, no proxy-applying, response is ok but no proxy. Could this be because of Windows? I have 10 and at startup there are no requests for permissions, in contrast to many programs is very strange.