Reading user file system returns AccessDeniedException [duplicate]

夙愿已清 提交于 2019-11-29 17:42:07

The javadoc for that exception says:

"[This is a] checked exception [that is] thrown when a file system operation is denied, typically due to a file permission or other access check."

So the most likely explanation is that the account under which the application is running doesn't have permission to read the "/home/adam/.gconf/apps/gedit-2" directory.

This is because the running program doesn't have access to specified file. From the stack trace:

Caused by: java.io.UncheckedIOException: java.nio.file.AccessDeniedException: /home/adam/.gconf/apps/gedit-2
Caused by: java.nio.file.AccessDeniedException: /home/adam/.gconf/apps/gedit-2

See the permission of /home directory and /home/adam/.gconf/apps/gedit-2 file, whether it is accessible by user running the program.

The other possibilities is there are no such file/directory.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!