org.apache.commons.launcher
public class LaunchTask extends Task
java.endorsed.dirs
when running with JDK 1.4.
Field Summary | |
---|---|
static String | ARG_PROP_NAME
The argument property name. |
static String | TASK_NAME
The name of this task. |
Method Summary | |
---|---|
void | addArg(ConditionalArgument arg)
Add a nested arg element. |
void | addArgset(ArgumentSet set)
Add a nested argset element.
|
void | addJvmarg(ConditionalArgument jvmArg)
Add a nested jvmarg element. |
void | addJvmargset(JVMArgumentSet set)
Add a nested jvmargset element.
|
void | addSysproperty(ConditionalVariable var)
Add a nested sysproperty element. |
void | addSyspropertyset(SysPropertySet set)
Add a nested syspropertyset element.
|
Path | createClasspath()
Create a nested classpath element.
|
Path | createFilterclasspath()
Create a nested filter classpath element.
|
void | execute()
Construct a Java command and execute it using the settings that Ant
parsed from the Launcher's XML file. |
static Process[] | getChildProcesses()
Get the synchronous child processes for all instances of this class.
|
void | setAppendoutput(boolean appendOutput)
Set the appendOutput flag. |
void | setClassname(String mainClassName)
Set the class name.
|
void | setClasspath(Path classpath)
Set the classpath.
|
void | setClasspathref(Reference ref)
Adds a reference to a classpath defined elsewhere.
|
void | setDebug(boolean debug)
Set the debug flag. |
void | setDisplayminimizedwindow(boolean displayMinimizedWindow)
Set the displayMinimizedWindow flag. |
void | setDisposeminimizedwindow(boolean disposeMinimizedWindow)
Set the disposeMinimizedWindow flag. |
void | setFailonerror(boolean failOnError)
Set the failOnError flag.
|
void | setFilterclassname(String filterClassName)
Set the filter class name.
|
void | setFilterclasspath(Path filterClasspath)
Set the filter class' classpath.
|
void | setMinimizedwindowicon(File minimizedWindowIcon)
Set the icon file for the minimized window that will be displayed in the
Windows taskbar. |
void | setMinimizedwindowtitle(String minimizedWindowTitle)
Set the title for the minimized window that will be displayed in the
Windows taskbar. |
void | setOutput(File outputFile)
Set the file that the child JVM's System.out and System.err will be
redirected to. |
void | setPrint(boolean print)
Set the print flag. |
void | setRedirectoutput(boolean redirect)
Set the redirect flag. |
void | setRequiretools(boolean requireTools)
Set the requireTools flag. |
void | setUseargs(boolean useArgs)
Set the useArgs flag. |
void | setUsesystemin(boolean useSystemIn)
Set the useSystemIn flag. |
void | setWaitforchild(boolean waitForChild)
Set the waitForChild flag. |
Parameters: arg the arg element
Parameters: set the argset element
Parameters: jvmArg the jvmarg element
Parameters: set the jvmargset element
Parameters: var the sysproperty element
Parameters: set the syspropertyset element
Returns: the Path object that contains all nested classpath elements
Returns: the Path object that contains all nested filter classpath elements
Throws: BuildException if there is a configuration or other error
Returns: the instances of this class.
Parameters: appendOutput true if output should be appended to the output file
Parameters: mainClassName the class to execute main(String[])
Parameters: classpath the classpath
Parameters: ref reference to the classpath
Parameters: debug the debug flag
Parameters: displayMinimizedWindow true if a minimized window should be displayed in the Windows task bar while the child process is executing
main(String[])
returns.
This flag is normally used for applications that don't explicitly call
{@link System#exit(int)}. If an application does not explicitly call
{@link System#exit(int)}, an minimized windows need to be disposed of
for the child JVM to exit.
Parameters: disposeMinimizedWindow true if a minimized window in the Windows
taskbar should be automatically disposed of after the child JVM's
main(String[])
returns
Parameters: failOnError true if the launch process should stop if the child JVM returns an exit value other than 0
Parameters: filterClassName the class that implements the {@link LaunchFilter} interface
Parameters: classpath the classpath for the filter class
Parameters: minimizedWindowIcon the icon file to use for any minimized window that is displayed in the Windows taskbar
Parameters: minimizedWindowTitle the title to set for any minimized window that is displayed in the Windows taskbar
Parameters: outputFile a File to redirect System.out and System.err to
Parameters: print the print flag
Parameters: redirect true if System.out and System.err should be redirected
Parameters: redirect true if a JDK is required and false if only a JRE is required
Parameters: useArgs the useArgs flag
Parameters: useSystemIn the useSystemIn flag
Parameters: waitForChild the waitForChild flag