IP是否可访问
//package com.nowjava;// from 时 代 Java 公 众 号 - nowjava.com import java.net.InetAddress; public class Main { public static boolean isReachable(String ip, int timeout) { try { InetAddress address = InetAddress.getByName(ip); return address.isReachable(timeout); } catch (Exception e) { e.printStackTrace(); } return false; } /** 来 自 n o w j a v a . c o m **/ public