public static ChildProcess Exec(string filename, string[] arguments = null) { var childProcess = new ChildProcess(filename, arguments); childProcess.Start(); return(childProcess); }
private bool Launch() { _childProcess = _config.LaunchMode == LaunchMode.Normal ? new ChildProcess(_config.Javaw, _arguments.ToArray()) : new ChildProcess(_config.Javaw, _versionDirectory, _arguments.ToArray()); if (!_childProcess.Start()) { return(false); } _childProcess.OnStdOut += OnStdOut; _childProcess.OnStdErr += OnStdOut; _childProcess.OnExit += ChildProcessOnExit; _errorCount = CountError(); return(true); }