Here you can find the source of setExecutable(File file)
public static boolean setExecutable(File file)
//package com.java2s; //License from project: Open Source License import java.io.File; import java.io.FilePermission; public class Main { public static boolean setExecutable(File file) { try {//from ww w . j a v a2s . c o m new FilePermission(file.getAbsolutePath(), "execute"); return true; } catch (Exception e) { return false; } } }