Java exec exec(String command)

Here you can find the source of exec(String command)

Description

exec

License

Open Source License

Declaration

public static Process exec(String command) throws IOException 

Method Source Code

//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);
    }
}

Related

  1. exec(String cmd)
  2. exec(String cmd)
  3. exec(String cmd)
  4. exec(String cmd)
  5. exec(String cmd, File dir)
  6. exec(String command)
  7. exec(String command)
  8. exec(String command)
  9. exec(String command)