Have you ever seen the error below when you try to start up a servlet container in java? What about when you try to access a port greater than 65535 on your pc or mac?
Protocol handler start failed: java.lang.IllegalArgumentException: Port value out of range:
Take a look at the InetSocketAddress class's constructor detail section.
This should help you not pull out your hair.