Accepted answer

if anyone having this issue, try installing eclipse in the documents folder. that what i tried and worked for me.


  1. goto system preferences > security & privacy > full disk access > add eclipse
  2. restart eclipse & pc

then your java able to get listfiles()

enter image description here

Related Query

More Query from same tag