Here you can find the source of callShell(final String shellString, final Logger log)
public static void callShell(final String shellString, final Logger log)
//package com.java2s; //License from project: Apache License import org.slf4j.Logger; public class Main { public static void callShell(final String shellString, final Logger log) { Process process = null;//from w w w . j a va 2 s. co m try { String[] cmdArray = splitShellString(shellString); process = Runtime.getRuntime().exec(cmdArray); process.waitFor(); log.info("callShell: <{}> OK", shellString); } catch (Throwable e) { log.error("callShell: readLine IOException, " + shellString, e); } finally { if (null != process) process.destroy(); } } private static String[] splitShellString(final String shellString) { String[] split = shellString.split(" "); return split; } }