Here you can find the source of setExecutable(File file, boolean executable)
public static void setExecutable(File file, boolean executable) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.*; public class Main { public static void setExecutable(File file, boolean executable) throws IOException { if (executable && !file.setExecutable(true)) { throw new IOException("Cannot set executable permissions for: " + file); }//from www. j a v a 2s . c om } }