package com.claw.util.shell; import org.apache.log4j.Logger; public class ShellUtil { private static Logger logger = Logger.getLogger(ShellUtil.class); public static void shell(String[] cmd){ try { Runtime.getRuntime().exec(cmd).waitFor(); } catch (Exception e) { e.printStackTrace(); logger.error(e.getMessage()); } } public static void shell(String cmd){ try { Runtime.getRuntime().exec(cmd).waitFor(); } catch (Exception e) { e.printStackTrace(); logger.error(e.getMessage()); } } }