Runtime.getRuntime().exec("chmod +x ) change to file.setExecutable(true);