I keep getting a BindException whenever I try to open a ServerSocket. What could be causing this?
Tim Rohaly There are two basics reasons you might get a BindException:
- The port is already in use by another application. In this case, the message field of the exception should be set to "Address already in use". You can use the netstat command on Windows or Unix to see what ports are currently in use.
- You're using Unix and trying to open the ServerSocket on a port in the range 1-1023 without root permission. In this case, the message field of the exception should be set to "Permission denied".