Properties prop = System.getProperties(); String os = prop.getProperty("os.name"); System.out.println(os);os.startWith("win") || os.startWith("Win")
JAVA 判断操作系统
原文:http://www.cnblogs.com/geminer/p/4054633.html