/*
 * Copyright (c) 2004-2017, by Alex Leigh.
 * All rights reserved.
 *
 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE
 * The copyright notice above does not evidence any
 * actual or intended publication of such source code.
 */

package lc.mecha.exec;

import java.io.File;

/**
 * Contains utility methods useful for invoking another copy of the Java VM. Within the constraints of this
 * class, it is presumed that no input/output will be exchange, and the "forking" process will not monitor
 * the new process.
 * <p>
 * This class was initially created to facilitate running jobs from ESP/ENGINE.
 *
 * @author Alex Leigh
 */
public final class JavaRuntime {
    /**
     * Return the full path to the java executable for this execution. This is the executable
     * which will be invoked by this class for any future instances.
     *
     * @return
     */
    public static String buildExecPath() {
        return System.getProperty("java.home") + File.separator + "bin" + File.separator + "java";
    }
}