Here you can find the source of exec(String command)
public static Process exec(String command) throws IOException
//package com.java2s; /* /* ww w . ja v a2 s .co m*/ * The MIT License * * Copyright 2014 Kamnev Georgiy (nt.gocha@gmail.com). * * ??????? ????????? ?????????, ????????????, ?????, ?????????? ????? ??????? ???????????? * ????????????? ? ??????????????? ???????????? (? ?????????? ?????????? "??????????? ????????????"), * ????????????? ??????????? ???????????? ??? ???????????, ???????? ?????????????? ????? ?? * ??????????????, ???????????, ?????????, ???????????, ??????????, ?????????????????, ?????????????????? * ?/??? ??????? ????? ???????????? ?????????????, ????? ??? ? ?????, ??????? ??????????????????? * ?????? ??????????? ????????????, ??? ??????????? ?????????? ????????: * * ??????????????? ???????? ? ?????? ????????? ?????? ???? ???????? ?? ???? ????? * ??? ???????? ?????? ??????? ???????????? ?????????????. * * ????????? ????????????? ???????????? ???????????????? ????? ?????, ??? ?????? ????? ???????????, * ????? ????????????? ??? ?????????????????, ????????, ??? ??? ???????????????? ????????????? ?????????? ????????????, * ???????????? ?? ??? ????????????? ??????????????? ? ??????????????? ?????. ??? ? ?????? ??????? ??????? * ??? ?????????????????? ??? ?????? ????????????????? ?? ?????? ? ??????????? ???????, ??????? * ??? ?????? ???????????? ?? ??????????? ?????????????, ????????? ??? ??????, ?????????? ??, ??????? * ????????? ??? ???????????? ? ????????????? ????????????? ??? ???????????????? ?????????????? ???????????? * ??? ?????? ?????????? ? ????????????? ?????????????. */ import java.io.File; import java.io.IOException; public class Main { public static Process exec(String command) throws IOException { return Runtime.getRuntime().exec(command); } public static Process exec(String[] command) throws IOException { return Runtime.getRuntime().exec(command); } public static Process exec(String command, String[] env) throws IOException { return Runtime.getRuntime().exec(command, env); } public static Process exec(String[] command, String[] env) throws IOException { return Runtime.getRuntime().exec(command, env); } public static Process exec(String command, String[] env, File dir) throws IOException { return Runtime.getRuntime().exec(command, env, dir); } public static Process exec(String[] command, String[] env, File dir) throws IOException { return Runtime.getRuntime().exec(command, env, dir); } }