我想在运行时在 java 程序中以编程方式获取 os 名称。我试过了,System.getProperty("os.name")但结果是"Linux"。这该怎么做?
System.getProperty("os.name")
"Linux"
java 14.04
14.04 ×1
java ×1