prova qui:

http://java.sun.com/j2se/1.4.2/docs/...mple/Ping.java