1

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?

1
  • Not clear what you are asking? Commented Jul 1, 2016 at 15:34

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

one question, i'm using threads for each webscrapper, this means my proxy settings will affect just the one with proxy settings?
No, all the webscrappers in the one process will use the same settings if they get configuration from the system properties even if they are different threads.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.