> Turns out, supplying a port of "0" to a java ServerSocket will select a
> random open port for automagically! I'm refactoring this code to do just
> that.

That is Unix behaviour, rather than Java behaviour, FWIW.