System.getProperty("os.name")

Here is a handy Java class that useSystem.getProperty("os.name") to detect which type of operating system (OS) you are using now. This code can detect “Windows”, “Mac”, “Unix” and “Solaris”

转载于:https://www.cnblogs.com/kakaisgood/p/9492399.html

你可能感兴趣的:(System.getProperty("os.name"))