Here you can find the source of makeExecutable(String path)
public static void makeExecutable(String path)
//package com.java2s; //License from project: Apache License import java.io.File; public class Main { public static void makeExecutable(String path) { if (path == null) { return; }//from w w w . j a v a 2 s .c o m File file = new File(path); if (file.exists() && !file.canExecute()) { file.setExecutable(true); } } }