更新时间:2023-02-04 16:25:48
我不知道它在其他操作系统,但在Windows中,您可以使用这样的东西
I am not sure how it works in other OS but in Windows you can use something like this
Desktop.getDesktop().open(new File("c:\\"));
找到其他方式(从该答案中检查链接到FileExplorer类)。还可以使用 System.getProperty(os.name)
来确定操作系统。
Found another way (check link to FileExplorer class from that answer). Also you can use System.getProperty("os.name")
to determine operation system.