//当前用户桌面
File desktopDir = FileSystemView.getFileSystemView()
.getHomeDirectory();
String desktopPath = desktopDir.getAbsolutePath();
File desktopDir = FileSystemView.getFileSystemView()
.getHomeDirectory();
String desktopPath = desktopDir.getAbsolutePath();
本文介绍了一种使用 Java 获取当前用户桌面目录的方法。通过 FileSystemView 的 getHomeDirectory() 方法,可以轻松地获得用户的桌面路径。
4018

被折叠的 条评论
为什么被折叠?



