Java - Delete directory - IOException: Unable to delete directory
You need to check the following to fix this issue:-
User Id/account with which you are running your application must have permission to delete the below directory. If you are running the java application with your account then you must have permission to delete the below directory.
/opt/appdata/conv/data/out/Job000000000676
Add the account into the proper group. To do that first check with
ls -ltr
execute it inside/opt/appdata/conv/data/out
and add your account to the group which has full permission to delete directories insideout
directoryAlso check if
Job000000000676
has sub directory inside it. In such a condition you can execute unix command likerm -rf /opt/appdata/conv/data/out/Job000000000676
. See how to execute unix command from java application for detail.
Hope this will help you.