java獲取本機IP

只能在windows中獲取的java InetAddress.getLocalHost()windows 也能在Linux下獲取的代碼以下: code private void getIp() throws SocketException { Enumeration allNetInterfaces = NetworkInterface.getNetworkInterfaces(); In
相關文章
相關標籤/搜索