The above has a feature in it whereby it selects local network addresses for interfaces that don't work.
I have changed it myself as follows to ignore certain local interfaces. It may be that someone would wish to make a similar change to the main branch. It may be that the change is not useful to other people, but I thought it might be - hence the email. It caused some interesting exceptions.
private static InetAddress getLocalHostLanAddress()
for (Enumeration<NetworkInterface> networkInterfaces =
NetworkInterface networkInterface =
// Iterate all IP addresses assigned to each card...
*** I have added the four following lines.
if (networkInterface.isUp()==false) continue;
if (networkInterface.isLoopback()) continue;
if (networkInterface.isVirtual()) continue;
if (networkInterface.isPointToPoint()) continue;