public static void setExecutePermissions ( final File scriptfile ) throws IOException { if ( ! scriptfile . setExecutable ( true , true ) ) { System . err . println ( "Unable to set executable bit on temp script file, execution may fail: " + scriptfile . getAbsolutePath ( ) ) ; } }
Set the executable flag on a file if supported by the OS