思路如下: 首先判断当前的操作系统:System.getProperty("os.name")System.getProperty("os.arch")System.getProperty("os.version")然后根据不同的操作系统,调用不同的获取方法:linux的:http://www.programfan.com/article/2937.htmlwindows的:http://www.99inf.net/SoftwareDev/Java/54523.htm