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”

posted @ 2018-08-17 11:28  kakaisgood  阅读(2802)  评论(0)    收藏  举报