Can someone tell me why this is?
Your user does not have permission to create a file in this directory.
Is there a way to change permissions?
Similarly, you would change the permissions of any directory.
In Java 7+
Files.setPosixFilePermisions(f1.toPath(), EnumSet.of(OWNER_READ, OWNER_WRITE, OWNER_EXECUTE, GROUP_READ, GROUP_EXECUTE));
And if I were to compile this as a .jar file and send it to someone, would that person have the correct permissions?
I suspect that the correct permissions for the directory named /System are that you do not have write access.
Is there a reason not to use the home directory or current working directory?
source share