Datagram Socket "must be caught or declared to be thrown"
<p>The following code is producing an error</p>

<pre><code>DatagramSocket socket = new DatagramSocket();
</code></pre>

<p>The java.net.* is included at the top</p>

<p>The error is <code>unreported exception java.net.SocketException; must be caught or d
eclared to be thrown</code></p>

<p>It's in a method run() in a class that uses a thread.</p>

<p>Any ideas?</p>
