public static boolean ensureExecutable(File file) {
if (file == null || !file.exists()) {
return false;
}
if (!file.canExecute()) {
Logger logger = AnalysisEngine.getInstance().getLogger();
if (!makeExecutable(file)) {
logger.logError(file + " cannot be made executable");
return false;
}
logger.logError(file + " was not executable");
}
return true;
}