I'm trying to run a jar file through a socks proxy. If I only had one jar, it would probably work to just change system variables, but I need to run like 20 jar files at the same time, all with different proxies. How do I accomplish this?
Set different proxy properties for each of them, as needed, for example in a shell script:
java -Dhttp.proxyHost=10.0.0.100 -Dhttp.proxyPort=8800 -jar path/to/program1.jar java -Dhttp.proxyHost=10.0.0.101 -Dhttp.proxyPort=8801 -jar path/to/program2.jar java -Dhttp.proxyHost=10.0.0.102 -Dhttp.proxyPort=8802 -jar path/to/program3.jar