C#/JAVA获取当前系统桌面路径

C#:

    string dir = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory); MessageBox.Show("桌面的路径是"+dir);

JAVA:

    File desktopDir = FileSystemView.getFileSystemView() .getHomeDirectory();
    String desktopPath = desktopDir.getAbsolutePath();

猜你喜欢

转载自blog.csdn.net/weixin_42565127/article/details/124747392
今日推荐