package IO; import org.slf4j.LoggerFactory; import java.io.IOException; public class Bash { public static void runBash(String command){ LoggerFactory.getLogger(Bash.class).debug("run bash command: " + command); String[] cmd = new String[]{"/bin/sh", command}; try { Runtime.getRuntime().exec(cmd); } catch (IOException e){ LoggerFactory.getLogger(Bash.class).error(e.getMessage()); } } }