취미 기록용 블로그
public String getLocalIpAddress(){ final String IP_NONE = “N/A”; final String WIFI_DEVICE_PREFIX = “eth”; String LocalIP = IP_NONE; try { NetworkInterface.getNetworkInterfaces(); for (Enumeration en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements();) { NetworkInterface intf = en.nextElement(); for (Enumeration enumIpAddr = intf.getInetAddresses(); enumIpAddr.hasMoreElements();) { InetAddress inetAddress… “read more”