public class JkProcess extends JkAbstractProcess<JkProcess>
CURRENT_JAVA_DIR
Modifier | Constructor and Description |
---|---|
protected |
JkProcess() |
protected |
JkProcess(JkProcess other) |
Modifier and Type | Method and Description |
---|---|
protected JkProcess |
copy() |
static JkProcess |
of(java.nio.file.Path commandPath,
java.lang.String... parameters)
Creates a new
JkProcess object using the specified command path and parameters. |
static JkProcess |
of(java.lang.String... parameters)
Creates a
JkProcess using the specified command and
parameters. |
static JkProcess |
ofCmdLine(java.lang.String commandLine,
java.lang.String... tokens)
Creates a new
JkProcess object using the specified command line. |
static JkProcess |
ofJavaTool(java.lang.String javaTool,
java.lang.String... parameters)
Defines a
JkProcess using the specified tool of the JDK and
parameters. |
static JkProcess |
ofWinOrUx(java.lang.String windowsCommand,
java.lang.String unixCommand,
java.lang.String... parameters)
Creates a new
JkProcess object with the appropriate command based on the operating system. |
addParams, addParams, addParamsAsCmdLine, addParamsAt, addParamsAt, addParamsIf, customizeCommand, exec, execAsync, execCmd, execCmdLine, getParamAt, getParams, getWorkingDir, inheritJkLogOptions, isFailOnError, redirectErrorStream, removeParam, run, setCollectStderr, setCollectStdout, setDestroyAtJvmShutdown, setEnv, setFailOnError, setInheritIO, setLogCommand, setLogWithJekaDecorator, setParamAt, setWorkingDir, setWorkingDir, toString
protected JkProcess()
protected JkProcess(JkProcess other)
protected JkProcess copy()
copy
in class JkAbstractProcess<JkProcess>
public static JkProcess of(java.lang.String... parameters)
JkProcess
using the specified command and
parameters.public static JkProcess of(java.nio.file.Path commandPath, java.lang.String... parameters)
JkProcess
object using the specified command path and parameters.commandPath
- The path to the command to be executed.parameters
- The parameters to be passed to the command.JkProcess
instance configured with the specified command and parameters.public static JkProcess ofCmdLine(java.lang.String commandLine, java.lang.String... tokens)
JkProcess
object using the specified command line.commandLine
- The command line to be executed. The command line is a space separated string
that will be parsed in an array od arguments.public static JkProcess ofWinOrUx(java.lang.String windowsCommand, java.lang.String unixCommand, java.lang.String... parameters)
JkProcess
object with the appropriate command based on the operating system.windowsCommand
- The command to be executed on Windows.unixCommand
- The command to be executed on Unix-like systems.parameters
- The parameters to be passed to the command.public static JkProcess ofJavaTool(java.lang.String javaTool, java.lang.String... parameters)
JkProcess
using the specified tool of the JDK and
parameters. An example of JDK tool is 'javac'.