When I executed my java class it turned out that I don't have some privileges when I try to access a file and I've got false
:
file.canRead()
In order to get necessary rights I want to know who executes my code, I mean username who runs java class.