System.getProperty(“os.name“)在不同操作系统上的输出

System.out.println(System.getProperty("os.name"));

操作系统 输出
linux Linux
windows Windows XP

猜你喜欢

转载自blog.csdn.net/listeningdu/article/details/129583530