java获取计算机用户名
Map<String, String> map = System.getenv();
String userName = map.get("USERNAME");// 获取用户名
String computerName = map.get("COMPUTERNAME");// 获取计算机名
String userDomain = map.get("USERDOMAIN");// 获取计算机域名
System.out.println("userName:"+userName);
System.out.println("computerName:"+computerName);
System.out.println("userDomain:"+userDomain);