可以用网卡,计算机名,IP,windows的 userid
System.getProperty("user.name") 得到userid

解决方案 »

  1.   

    帮你写一段取MAC地址的代码,自己看吧import java.io.InputStreamReader;
    import java.io.LineNumberReader;class Test { public static void main(String[] args) {
    Test test = new Test();
    System.out.println(test.getMACAddress());
    } public String getMACAddress() {
    String strMacAddr = null;
    try {
    Process process = Runtime.getRuntime().exec("ipconfig /all");
    InputStreamReader ir = new InputStreamReader(process
    .getInputStream());
    LineNumberReader input = new LineNumberReader(ir);
    String line;
    while ((line = input.readLine()) != null) {
    if (line.indexOf("Physical Address") > 0) {
    strMacAddr = line.substring(line.indexOf("-") - 2);
    }
    }
    } catch (java.io.IOException e) {
    System.err.println("IOException " + e.getMessage());
    }
    return strMacAddr;
    }
    }