-3

What would be the easiest way to check that the operating system running my Java application is Windows XP or later?

EDIT: I know about System.getProperty("os.name") but I don't know the best way and/or most efficient way to check what version of Windows is running. Ideally, I would also like to make it future proof so that if another version of Windows is released I don't need to change the code.

4

2 に答える 2

1

mkyong がチュートリアルを提供しています: http://www.mkyong.com/java/how-to-detect-os-in-java-systemgetproperyosname/

それはに依存していますSystem.getProperty("os.name")

于 2013-08-29T14:12:54.890 に答える