java.lang.Cloneable
public class LaunchTask
extends org.apache.tools.ant.Task
java.endorsed.dirs
when running with JDK 1.4.
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
ARG_PROP_NAME |
The argument property name.
|
static java.lang.String |
TASK_NAME |
The name of this task.
|
Constructor | Description |
---|---|
LaunchTask() |
Modifier and Type | Method | Description |
---|---|---|
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.
|
org.apache.tools.ant.types.Path |
createClasspath() |
Create a nested classpath element.
|
org.apache.tools.ant.types.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 java.lang.Process[] |
getChildProcesses() |
Get the synchronous child processes for all instances of this class.
|
void |
setAppendoutput(boolean appendOutput) |
Set the appendOutput flag.
|
void |
setClassname(java.lang.String mainClassName) |
Set the class name.
|
void |
setClasspath(org.apache.tools.ant.types.Path classpath) |
Set the classpath.
|
void |
setClasspathref(org.apache.tools.ant.types.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(java.lang.String filterClassName) |
Set the filter class name.
|
void |
setFilterclasspath(org.apache.tools.ant.types.Path filterClasspath) |
Set the filter class' classpath.
|
void |
setMinimizedwindowicon(java.io.File minimizedWindowIcon) |
Set the icon file for the minimized window that will be displayed in the
Windows taskbar.
|
void |
setMinimizedwindowtitle(java.lang.String minimizedWindowTitle) |
Set the title for the minimized window that will be displayed in the
Windows taskbar.
|
void |
setOutput(java.io.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.
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
public static final java.lang.String ARG_PROP_NAME
public static final java.lang.String TASK_NAME
public static java.lang.Process[] getChildProcesses()
public void addArg(ConditionalArgument arg)
execute()
method.arg
- the arg elementpublic void addArgset(ArgumentSet set)
set
- the argset elementpublic void addJvmarg(ConditionalArgument jvmArg)
execute()
method.jvmArg
- the jvmarg elementpublic void addJvmargset(JVMArgumentSet set)
set
- the jvmargset elementpublic void addSysproperty(ConditionalVariable var)
execute()
method.var
- the sysproperty elementpublic void addSyspropertyset(SysPropertySet set)
set
- the syspropertyset elementpublic org.apache.tools.ant.types.Path createClasspath()
public org.apache.tools.ant.types.Path createFilterclasspath()
public void execute() throws org.apache.tools.ant.BuildException
execute
in class org.apache.tools.ant.Task
org.apache.tools.ant.BuildException
- if there is a configuration or other errorpublic void setUseargs(boolean useArgs)
Launcher.start(String[])
method to the arguments
passed to the child JVM.useArgs
- the useArgs flagpublic void setUsesystemin(boolean useSystemIn)
useSystemIn
- the useSystemIn flagpublic void setWaitforchild(boolean waitForChild)
waitForChild
- the waitForChild flagpublic void setClassname(java.lang.String mainClassName)
mainClassName
- the class to execute main(String[])
public void setClasspath(org.apache.tools.ant.types.Path classpath)
classpath
- the classpathpublic void setClasspathref(org.apache.tools.ant.types.Reference ref)
ref
- reference to the classpathpublic void setDebug(boolean debug)
debug
- the debug flagpublic void setDisplayminimizedwindow(boolean displayMinimizedWindow)
setWaitforchild(boolean)
method.displayMinimizedWindow
- true if a minimized window should be
displayed in the Windows task bar while the child process is executingpublic void setDisposeminimizedwindow(boolean disposeMinimizedWindow)
setDisplayminimizedwindow(boolean)
to be automatically
disposed of when the child JVM's main(String[])
returns.
This flag is normally used for applications that don't explicitly call
System.exit(int)
. If an application does not explicitly call
System.exit(int)
, an minimized windows need to be disposed of
for the child JVM to exit.disposeMinimizedWindow
- true if a minimized window in the Windows
taskbar should be automatically disposed of after the child JVM's
main(String[])
returnspublic void setFailonerror(boolean failOnError)
failOnError
- true if the launch process should stop if the child
JVM returns an exit value other than 0public void setFilterclassname(java.lang.String filterClassName)
filterClassName
- the class that implements the
LaunchFilter
interfacepublic void setFilterclasspath(org.apache.tools.ant.types.Path filterClasspath)
classpath
- the classpath for the filter classpublic void setMinimizedwindowtitle(java.lang.String minimizedWindowTitle)
minimizedWindowTitle
- the title to set for any minimized window
that is displayed in the Windows taskbarpublic void setMinimizedwindowicon(java.io.File minimizedWindowIcon)
minimizedWindowIcon
- the icon file to use for any minimized window
that is displayed in the Windows taskbarpublic void setOutput(java.io.File outputFile)
setRedirectoutput(boolean)
method.outputFile
- a File to redirect System.out and System.err topublic void setPrint(boolean print)
System.out
.print
- the print flagpublic void setAppendoutput(boolean appendOutput)
setOutput(File)
method. Setting this flag to false will cause
the child to overwrite the file.appendOutput
- true if output should be appended to the output filepublic void setRedirectoutput(boolean redirect)
setOutput(File)
method. Setting this flag to false will
cause no redirection.redirect
- true if System.out and System.err should be redirectedpublic void setRequiretools(boolean requireTools)
redirect
- true if a JDK is required and false if only a JRE
is requiredCopyright (c) 2001-2002 - Apache Software Foundation