 <p><a href="http://stackoverflow.com/a/31309657/2593751">Niknam ansuwer</a> is perfect and I want to add if you use tor just add in your environment </p> <pre><code>export _JAVA_OPTIONS="-DsocksProxyHost=127.0.0.1 -DsocksProxyPort=9050" </code></pre>