So I am trying to write an .sh file that will be executable, this is how I\'m currently writing it:
Writer output = null;
try {
output = new BufferedWrite
You can call File.setExecutable() to set the owner's executable bit for the file, which might be sufficient for your case. Or you can just chmod
it yourself with a system call with Process
.
Alas, full-powered programmatic alteration of file permissions isn't available until Java 7. It'll be part of the New IO feature set, which you can read more about here.