Here you can find the source of exec(String exec)
private static void exec(String exec) throws IOException
//package com.java2s; /******************************************************************************* * Copyright (c) 2006-2008 VecTrace (Zingo Andersen) and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors:/*from w ww . j a v a 2s .com*/ * VecTrace (Zingo Andersen) - implementation * Software Balm Consulting Inc (Peter Hunnisett <peter_hge at softwarebalm dot com>) - some updates * StefanC - some updates * Stefan Groschupf - logError * Bastian Doetsch - updates, cleanup and documentation * Andrei Loskutov - bug fixes *******************************************************************************/ import java.io.IOException; public class Main { private static void exec(String exec) throws IOException { //Runtime.getRuntime().exec(getHGExecutable()); new ProcessBuilder(exec).start(); } }