http://www.davidreilly.com/java/java_network_programming/#3.5
From the FAQ
3.5 How do I implement PING in Java?
Java includes support for UDP and TCP sockets. PING requires support for the Internet Control Message Protocol (ICMP). Your only choice (at the moment), is to use native code, or to use java.lang.Runtime to execute an external ping application. You won't be able to develop a 100% Pure implementation.
NB - A native implementation that uses the Java Native Interface (JNI) is available for PING, in both English and Spanish. See http://www.geocities.com/SiliconValley/Bit/5716/ping/ for more details.
~Tim