InetAddress byName = InetAddress.getByName("173.39.161.140"); System.out.println(byName); System.out.println(byNam
InetAddress.isReachable is flappy, and sometimes returns unreachable for addresses which we can ping.
InetAddress.isReachable
I tried the following:
ping -c 1 and check the exit status.
ping -c 1
exit status
Works for all the cases i had tried where InetAddress.isReachable doesn't work.