1 public class systemdemo {
2 public static void main(String[] args) {
3 System.out.println("系统版本为:"+System.getProperty("os.name")+System.getProperty("os.version")+System.getProperty("os.arch"));
4 System.out.println("系统用户为:"+System.getProperty("user.name"));
5 System.out.println("当前用户目录:"+System.getProperty("user.home"));
6 System.out.println("当前用户工作目录: "+System.getProperty("user.dir"));
7 }
8 }