Finding the version of OSX inside java

前端 未结 4 1481
情深已故
情深已故 2021-01-24 01:56

I need to test if the version of osx is < 10.5 inside java is this possible?

4条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-24 02:08

    Try

    System.getProperty("os.name")
    

    and/or

    System.getProperty("os.version")
    

    It returns String

    HERE you can find more info about System.getProperties

提交回复
热议问题