java获取本机IP - Fei飞 - 博客园
java获取本机IPpublic static void main(String[] args) throws UnknownHostException { InetAddress inet = InetAddress.getLocalHost(); System.out.println("本机的ip=" + inet.getHostAddress()); }