Friday, January 11, 2013

Java program to ping an IP address

Below is the Java program to ping an IP address.


Also note that you can use below syntax to check if remote IP address is is reachable or not.

String ip = "google.com";
InetAddress address = InetAddress.getByName(ip);
boolean chkConnection = address.isReachable(1000);

4 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Nice blog useful for those who are looking for some other program to ping the ip address ...I usually ping the ip address through sites like WhoisXY.com here they are rendering ping tool using which i can ping both web address and ip address ...

    ReplyDelete
  3. Awesome. I am a beginner and this article helped me to resolve the problem .Thank you author and the whole expect team.

    http://www.wikitechy.com/view-article/how-to-find-ip-address-in-java


    Both are really good,
    Cheers,
    Venkat

    ReplyDelete