摘要:        
可以用如下代码: InetAddress inet = InetAddress.getLocalHost(); System.out.println("本机的ip=" + inet.getHostAddress()); 在window下面可以工作。在linux下返回127.0.0.1。主要是在linux下返回的是/etc/hosts中配置的localhost的ip地址,而不是网卡的绑定地址。后来改...    阅读全文
        
            posted @ 2006-03-20 08:56
晨月
阅读(1039)
评论(0)
推荐(0)
        
     
                    
                     
                    
                 
                    
                 

 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号