public class ShowProperties{
public static void main(String[] args){
System.getProperties().list(System.out);//获取系统所有属性并输出
System.out.println(System.getProperty("user.name"));//输出获取的用户名
}
public class ShowProperties{
public static void main(String[] args){
System.getProperties().list(System.out);//获取系统所有属性并输出
System.out.println(System.getProperty("user.name"));//输出获取的用户名
}
转载于:https://my.oschina.net/u/3175971/blog/827425