java 如何判断操作系统是Linux还是Windows

如题所述

Properties properties = System.getProperties();
String property = properties.getProperty("os.name");
System.out.println(property);// Windows 8.1

温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答