Possible Duplicate:
How can I set the umask from within java?
How do you set file permissions to 777(or any other arbitrary permission) while creating a file object in java?
3 methods are available:
setReadalble(boolean boolean)
setWritable(boolean,boolean)
setExecutable(boolean,boolean)
This will set the file to "0777"
String path = "SOME/PATH";
final File file = new File(path);
file.setReadable(true, false);
file.setExecutable(true, false);
file.setWritable(true, false);