System.getProperties()可以获取系统的信息.包括 JDK路径,系统版本等等信息.我需要的是System.getProperty("sun.desktop")获取系统类型,因为我用的是 Windows操作系统,所以返回的String为windows.用System.getProperty("os.name")可以获取更详细的一些信息,我得到的结果为windows xp
System.getProperties()可以获取系统的信息.包括 JDK路径,系统版本等等信息.我需要的是System.getProperty("sun.desktop")获取系统类型,因为我用的是 Windows操作系统,所以返回的String为windows.用System.getProperty("os.name")可以获取更详细的一些信息,我得到的结果为windows xp