kao,这个问题我也解决了,怎么结帖?????????
找人进来领分吧!    //获得当前所有的环境变量
    Properties p = System.getProperties();
    Enumeration e = p.propertyNames();
    while (e.hasMoreElements()) {
      Object o = e.nextElement();
      System.out.println(o.toString() + " = " + System.getProperty(o.toString()));
    }
    //取得当前机器的IP
    try {
      InetAddress ia = InetAddress.getLocalHost();
      System.out.println(ia.getHostAddress());
    }
    catch (UnknownHostException ex) {
    }