有时候ping -a 都不行
可以试试
--------------
可以试试
pathping localhost--------------
ping -a localhost
InetAddress addr = InetAddress.getByName("16.173.244.212");
// Get the host name
String hostname = addr.getHostName();
System.out.println(hostname);
// Get canonical host name
String hostnameCanonical = addr.getCanonicalHostName();
本文介绍了一种在无法使用ping-a命令时,通过路径ping和获取主机名来解决问题的方法。包括如何获取本地主机地址、名称及别名。
1205

被折叠的 条评论
为什么被折叠?



