inetaddress - I am trying to ping www.google.com using JAVA in my office but it is not pinging the same -
I am trying to ping www.google.com to my office network but it is not ping. The code I am using is as follows:
import java.io.IOException; Import java.net.InetAddress; Import java.net.UnknownHostException; Public Class Demo 1 {Public Static Wide Men (String [] AGR) UnknowHost Exposure throws, IoE extension {try {string address = intrader.ATBanam ("www.google.com"). GetHostAddress (); InetAddress inet = InetAddress.getByName (address); System.out.println ("Sending the address" + address); If (inet.isReachable (50000)) {System.out.println ("host is reachable"); } Else {System.out.println ("Not accessible to host"); }} Hold (Exception E) {// TODO Automatic Holding Block e.printStackTrace (); }}} I do not know what the problem is, it can not ping it at www.facebook.com or www.youtube.com I do not have "access to the host" but it can ping the internal system of my office. All these external systems like google.com open in the browser, but why can not it ping, I do not know. So, can anyone help me with this? There are several other preferred ways to ping the server, and it seems that there are certain design flaws in the rectangle (here) Addressed:
Comments
Post a Comment