JAVA获取操作系统的信息

列出全部信息:

Properties prop = System.getProperties();

prop.list(System.out);


获取某个信息:

String os = prop.getProperty("os.name");

System.out.println(os);


凝视:

os.name:系统名称


其余的有待探索,希望大家来补充哦

posted @ 2017-05-21 22:00  yfceshi  阅读(364)  评论(0编辑  收藏  举报