标签:获取 int 计算机名 java put print env string main
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);
标签:获取 int 计算机名 java put print env string main
原文地址:https://www.cnblogs.com/mjtabu/p/13254070.html