Matthias Wessendorf I can be wrong, but why not just InetAddress.getByName(ip) and let it throw UnknownHostException?