Recommended: Sing it, brah! 5 fabulous songs for developers
JW's Top 5
I'm running test on Linux.
The file's permission is '-rwxr--r-- root root ...'
But
...
AccessController.checkPermission( new FilePermission( fileName, "read" ) );
...
This line occurs AccessControlException.
Why can't read this file?
I've created '.java.policy'
grant {
permission java.io.FilePermission "/-", "read";
};
So, I can read. But, I can't figure out the result.