ServerSocket TCP/IP. , bind IOException.
This method will not interfere with other applications that use the same method unless another application opens the same port (TCP / IP ports are identified by a 16-bit number). Therefore, you should choose a fixed port number and hope that there are no other applications that accidentally use the same port number.
Note that on Windows you can use the command netstatto see which ports are used, with which executables.
source
share