Finding the version of OSX inside java

前端 未结 4 1318
情深已故
情深已故 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:30

    Use System.getProperty.

    System.getProperty("os.version");
    

    The list of valid arguments for the function can be found here

提交回复
热议问题