Java tutorial
//package com.java2s; import java.io.IOException; import java.io.InputStream; public class Main { public static void exec(String cmd) { Process exec; try { exec = Runtime.getRuntime().exec(cmd); InputStream in = exec.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } }