On my machine, the following code compiles within Eclipse but throws an exception within Netbeans. The error message says \"Exception in thread \"main\" java.net.BindExcept
The problem is due to the fact that you left one instance of your server running and then started another one.