My code is as follow:
public chkRechable(String hostNameOrIp) {
boolean isRechable = InetAddress.getByName(hostNameOrIp).isReachable(30);
return isRechable;
}
Parameter can be "http://192.168.0.77:8080/ws/api/customer/5"
or "http://example.com:8080/ws/api/customer/5"
But everytime it's returning false although I can browse the URL.