Write an executable .sh file with Java for OSX
问题 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 BufferedWriter(new FileWriter(file2)); output.write(shellScriptContent); output.close(); } catch (IOException ex) { Logger.getLogger(PunchGUI.class.getName()).log(Level.SEVERE, null, ex); } So that writes the file just fine, but it is not executable. Is there a way to change the executable status when I write it? Edit: To further clarify, I am trying to