public class JkJavaProcess extends JkProcess<JkJavaProcess>
Modifier and Type | Field and Description |
---|---|
static java.nio.file.Path |
CURRENT_JAVA_EXEC_DIR |
static java.nio.file.Path |
CURRENT_JAVA_HOME |
Modifier | Constructor and Description |
---|---|
protected |
JkJavaProcess() |
Modifier and Type | Method and Description |
---|---|
JkJavaProcess |
addAgent(java.nio.file.Path agentLib,
java.lang.String agentOption)
Adds the specified agent to the command line.
|
JkJavaProcess |
addJavaOptions(java.util.Collection<java.lang.String> options)
Adds the specified java options to the command line.
|
JkJavaProcess |
addJavaOptions(java.lang.String... options) |
JkJavaProcess |
addJavaOptionsIf(boolean condition,
java.lang.String... options) |
static JkJavaProcess |
ofJava(java.lang.String className)
Creates a process launching the current JDK java command on the specified class.
|
static JkJavaProcess |
ofJavaJar(java.nio.file.Path jar,
java.lang.String className)
Creates a process launching the current JDK java command to execute the specified jar.
|
JkJavaProcess |
setClasspath(java.lang.Iterable<java.nio.file.Path> paths)
Convenient method to set classpath option.
|
addParams, addParams, addParamsFirst, addParamsFirst, addParamsIf, clone, exec, execAndReturnOutput, execIf, getCommand, getParams, getWorkingDir, inheritJkLogOptions, isFailOnError, of, ofCmdLine, ofJavaTool, ofWinOrUx, removeParam, run, setCommand, setEnv, setFailOnError, setLogCommand, setLogOutput, setWorkingDir, setWorkingDir, toString
public static final java.nio.file.Path CURRENT_JAVA_HOME
public static final java.nio.file.Path CURRENT_JAVA_EXEC_DIR
public static JkJavaProcess ofJava(java.lang.String className)
public static JkJavaProcess ofJavaJar(java.nio.file.Path jar, java.lang.String className)
className
- Can be null.public JkJavaProcess addAgent(java.nio.file.Path agentLib, java.lang.String agentOption)
agentOption
- Can be nullpublic JkJavaProcess addJavaOptions(java.util.Collection<java.lang.String> options)
public JkJavaProcess addJavaOptionsIf(boolean condition, java.lang.String... options)
public JkJavaProcess addJavaOptions(java.lang.String... options)
public JkJavaProcess setClasspath(java.lang.Iterable<java.nio.file.Path> paths)