Here you can find the source of ensureExecutable(final File file)
public static void ensureExecutable(final File file)
//package com.java2s; //License from project: LGPL import java.io.File; public class Main { public static void ensureExecutable(final File file) { if (!file.canExecute() && !file.setExecutable(true)) { throw new IllegalStateException(String.format( "Failed to set %s executable", file.getAbsolutePath())); }//www . j av a2 s . c o m } }