|
javadoc mentions "A typical implementation will use ICMP ECHO REQUESTs if the privilege can be obtained, otherwise it will try to establish a TCP connection on port 7 (Echo) of the destination host."
maybe the JVM is unable to get permission to do an ICMP echo, so it tries a TCP connect on port 7. If you are using windows i would have a look at firewall settings. The ping program might have intrinsic privilege elevation for that kind of thing.
or maybe the instantiation of the NetworkInterface(doesnt look like you are using it at all) object could be blocking the request.
Last edited by undertow : 01-24-2008 at 08:32 PM.
|