Cannot open url connection
<p>I have searched and looked and I cannot seem to find the source of my problem.
I have code that is supposed to be taking a url, but for some reason no matter what I do. It seems to not be connected.</p>

<pre><code>src = "http://ecx.images-amazon.com/images/I/410oAxun7dL._AA300_.jpg"
URL url = new URL(src);
URLConnection connection = (URLConnection) url.openConnection();
((HttpURLConnection) connection).setRequestMethod("GET");
connection.setDoInput(true);
connection.connect();
InputStream input = connection.getInputStream();
</code></pre>

<p>I get a <code>java.net.SocketException: Permission denied</code> error.</p>

<p>What is the cause of this error? And How would I fix it?</p>

<p>Thank you for your help!</p>
