//获取本机桌面目录File desktopDir = FileSystemView.getFileSystemView().getHomeDirectory();String desktopPath = desktopDir.getAbsolutePath();