estesMX
estesMX

Reputation: 29

Java Using proxy settings in jar

I'm doing a webscraping with jar i created, which uses a proxy. My question is that i have large project where more webscrapers will work in paralel.

Using this code:

System.getProperties().put("http.proxyHost", "someProxyURL");
System.getProperties().put("http.proxyPort", "someProxyPort");
System.getProperties().put("http.proxyUser", "someUserName");
System.getProperties().put("http.proxyPassword", "somePassword");

will affect the others webscrapers?

Upvotes: 1

Views: 953

Answers (1)

Oleg Kurbatov
Oleg Kurbatov

Reputation: 1386

If you run them as separate processes, then each process has its own system properties. If you are running them in one process as separate threads, they share those properties.

Upvotes: 1

Related Questions