java 获取指定的信息

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 }

 

posted @ 2012-03-15 18:42  谈笑风生膜法师  阅读(242)  评论(0)    收藏  举报