code: public boolean setExecutable(boolean executable, boolean ownerOnly) {
          return doChmod(ownerOnly ? S_IXUSR : (S_IXUSR | S_IXGRP | S_IXOTH), executable);
      }
docs: Manipulates the execute permissions for the abstract path designated by
  this file.
  
  <p>Note that this method does <i>not</i> throw {@code IOException} on failure.
  Callers must check the return value.
  
  @param executable
  To allow execute permission if true, otherwise disallow
  @param ownerOnly
  To manipulate execute permission only for owner if true,
  otherwise for everyone. The manipulation will apply to
  everyone regardless of this value if the underlying system
  does not distinguish owner and other users.
  @return true if and only if the operation succeeded. If the user does not
  have permission to change the access permissions of this abstract
  pathname the operation will fail. If the underlying file system
  does not support execute permission and the value of executable
  is false, this operation will fail.
  @since 1.6