Here you can find the source of execSystemCommand(String[] commands, String executionPath)
public static boolean execSystemCommand(String[] commands, String executionPath)
//package com.java2s; //License from project: Open Source License import java.io.File; import java.io.IOException; public class Main { public static boolean execSystemCommand(String[] commands, String executionPath) { try {/*from w w w . j av a 2 s . c om*/ File handler = new File(executionPath); Runtime rt = Runtime.getRuntime(); Process p1 = rt.exec(commands, null, handler); p1.waitFor(); } catch (InterruptedException e) { e.printStackTrace(); return false; } catch (IOException e) { e.printStackTrace(); return false; } return true; } }