A class inside java tests whether the ip can be connected successfully

Paste the code directly as follows:

      boolean status = InetAddress.getByName("192.168.1.22").isReachable(3000);

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327098798&siteId=291194637