Java tutorial
//package com.java2s; //License from project: Apache License import java.io.IOException; import java.net.InetAddress; public class Main { public static boolean scanWithPing(String ip, int timeout) throws IOException { return InetAddress.getByName(ip).isReachable(timeout); } }