Here you can find the source of runShellCommand(String command)
public static void runShellCommand(String command) throws IOException, InterruptedException
//package com.java2s; //License from project: Open Source License import java.io.IOException; public class Main { public static void runShellCommand(String command) throws IOException, InterruptedException { System.out.println("execute: " + command); Process process = Runtime.getRuntime().exec(command); process.waitFor();/* w ww . j av a2s . c o m*/ } }