public static class JavaProcess.ProcessOptions extends Object
| Constructor and Description |
|---|
ProcessOptions(Class<?> clz)
Construct a new
JavaProcess.ProcessOptions that inherits the classpath of
the current JVM and will runs the main method of the given class. |
ProcessOptions(File jarFile)
Construct a new
JavaProcess.ProcessOptions that will run the given jar
file. |
ProcessOptions(String classPath,
String mainClass)
Construct a new
JavaProcess.ProcessOptions with the given classpath and
main class. |
| Modifier and Type | Method and Description |
|---|---|
void |
outputErr(boolean outputErr)
Echo the
System.err stream from the running JVM |
void |
outputOut(boolean outputOut)
Echo the
System.out stream from the running JVM |
void |
setArgs(String args)
Set the argument string to pass to the program
|
void |
setArgs(String[] args)
Set the arguments to pass to the program
|
void |
setJvmArgs(String jvmArgs)
Set the JVM arguments to use when launching the program.
|
void |
setJvmArgs(String[] jvmArgs)
Set the JVM arguments to use when launching the program.
|
protected void |
setup(org.apache.tools.ant.taskdefs.Java java) |
void |
setWorkingDirectory(File workingDir)
Set the working directory for the JVM.
|
public ProcessOptions(Class<?> clz)
JavaProcess.ProcessOptions that inherits the classpath of
the current JVM and will runs the main method of the given class.clz - the main classpublic ProcessOptions(File jarFile)
JavaProcess.ProcessOptions that will run the given jar
file.jarFile - the jar filepublic ProcessOptions(String classPath, String mainClass)
JavaProcess.ProcessOptions with the given classpath and
main class.classPath - the classpath the JVM can searchmainClass - the main class to runpublic void setWorkingDirectory(File workingDir)
workingDir - the working directorypublic void setArgs(String args)
args - the argument stringpublic void setArgs(String[] args)
args - the argumentspublic void setJvmArgs(String jvmArgs)
jvmArgs - the JVM arguments.public void setJvmArgs(String[] jvmArgs)
jvmArgs - the JVM arguments.protected void setup(org.apache.tools.ant.taskdefs.Java java)
public void outputErr(boolean outputErr)
System.err stream from the running JVMoutputErr - true to echo; false to hidepublic void outputOut(boolean outputOut)
System.out stream from the running JVMoutputOut - true to echo; false to hide