public static String GetInetAddress(String host) {
        String IPAddress = "";
        InetAddress ReturnStr1 = null;
        try {
            ReturnStr1 = java.net.InetAddress.getByName(host);
            IPAddress = ReturnStr1.getHostAddress();
        } catch (UnknownHostException e) {
            e.printStackTrace();
            return IPAddress;
        }
        return IPAddress;
    }

  测试可用!

相关文章:

  • 2022-12-23
  • 2021-05-18
  • 2022-12-23
  • 2021-11-19
  • 2022-12-23
  • 2022-02-15
  • 2021-12-01
  • 2021-11-29
猜你喜欢
  • 2021-08-06
  • 2022-12-23
  • 2022-12-23
  • 2021-07-06
  • 2021-07-23
  • 2022-02-16
  • 2022-12-23
相关资源
相似解决方案