| Modifier and Type | Field and Description |
|---|---|
| private CommandlineJava | |
| private File | |
| private Environment | |
| private File | |
| private boolean | |
| private boolean | |
| private boolean | |
| private File | |
| private String | |
| private boolean | |
| private File | |
| private Permissions | |
| protected Redirector | |
| protected RedirectorElement | |
| private String | |
| private boolean | |
| private Long | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addAssertions(Assertions
assertion set. asserts)Add assertions to enable in this program (if fork=true). |
| public void | addConfiguredRedirector(RedirectorElement
RedirectorElement.Add a |
| public void | |
| public void | |
| public void | addSyspropertyset(PropertySet
set of properties to add. sysp)Add a set of properties as system properties. |
| protected void | |
| public void | |
| public Commandline. | |
| public Path | |
| public Path | |
| public Commandline. | |
| public Path | |
| public Permissions | Returns: Permissions.Set the permissions for the application run inside the same JVM. |
| public Path | |
| protected ExecuteWatchdog | |
| public void | |
| public int | Returns: the return code from the execute java class if it was executed in a separate VM (fork = "yes") or a security manager was installed that prohibits ExitVM (default).Do the execution and return a return code. |
| protected int | Returns: the exit value of the process if forked, 0 otherwise.CommandLineJava instance. commandLine)Execute the specified CommandlineJava. |
| private int | |
| public CommandlineJava | |
| public CommandlineJava. | Returns: the current properties of this java invocation.Get the system properties of the command line. |
| protected void | handleErrorFlush(String
string of stderr. output)Overrides org. |
| protected void | handleErrorOutput(String
string of stderr. output)Overrides org. |
| protected void | handleFlush(String
string of output on its way to its handlers. output)Overrides org. |
| public int | Returns: the number of bytes read.the buffer into which data is to be read. buffer, int the offset into the buffer at which data is stored. offset, int the amount of data to read. length)Overrides org. |
| protected void | handleOutput(String
a string of output on its way to the handlers. output)Overrides org. |
| private void | |
| protected void | maybeSetResultPropertyValue(int
the exit code result)Helper method to set result property to the passed in value if appropriate. |
| private void | run(CommandlineJava
CommandlineJava. command)Executes the given classname with the given arguments as it were a command line application. |
| protected void | |
| public void | setAppend(boolean
if true, append output to existing file. append)If true, append output to existing file. |
| public void | |
| public void | |
| public void | setClasspath(Path
an Ant Path object containing the classpath. s)Set the classpath to be used when running the Java class. |
| public void | setClasspathRef(Reference
a reference to an existing classpath. r)Set the classpath to use by reference. |
| public void | setCloneVm(boolean
if true copy system properties. cloneVm)If set, system properties will be copied to the cloned VM--as well as the bootclasspath unless you have explicitly specified a bootclasspath. |
| public void | |
| public void | setDiscardError(final boolean
if true error streams are discarded. discard)Whether error output should be discarded. |
| public void | setDiscardOutput(final boolean
if true output streams are discarded. discard)Whether output should be discarded. |
| public void | |
| public void | setErrorProperty(String
property name. errorProperty)Set the property name whose value should be set to the error of the process. |
| public void | setFailonerror(boolean
if true fail the build when the command exits with a
nonzero returncode. fail)If true, then fail if the command exits with a returncode other than zero. |
| public void | |
| public void | |
| public void | setInputString(String
the string which is used as the input source. inputString)Set the string to use as input. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setLogError(boolean
get in the ant log the messages coming from stderr
in the case that fork = true. logError)Set whether error output of exec is logged. |
| public void | |
| public void | |
| public void | setModulepath(Path
an Ant Path object containing the modulepath. mp)Set the modulepath to be used when running the Java class. |
| public void | setModulepathRef(Reference
a reference to an existing modulepath. r)Set the modulepath to use by reference. |
| public void | setNewenvironment(boolean
if true, use a completely new environment. newenv)If true, use a completely new environment. |
| public void | |
| public void | setOutputproperty(String
property name. outputProp)Set the property name whose value should be set to the output of the process. |
| public void | setResultProperty(String
name of property. resultProperty)Set the name of the property in which the return code of the command should be stored. |
| public void | setSourceFile(final String
The path to the source file sourceFile)Set the Java source-file to execute. |
| public void | setSpawn(boolean
if true you do not want Ant to wait for the end of the process. spawn)Set whether or not you want the process to be spawned; default is not spawned. |
| public void | setTimeout(Long
timeout in milliseconds. value)Set the timeout in milliseconds after which the process will be killed. |
| private void | setupCommandLine(Execute
executable. exe, String[] command to execute. command)Set the command line for the exe. |
| private void | setupCommandLineForVMS(Execute
executable. exe, String[] command to execute. command)On VMS platform, we need to create a special java options file containing the arguments and classpath for the java command. |
| private void | |
| private void | setupExecutable(Execute
executable. exe, String[] command to execute. command)Do all configuration for an executable that
is common across the |
| protected void | |
| private void | |
| private void |
| cmdl | back to summary |
|---|---|
| private CommandlineJava cmdl | |
| dir | back to summary |
|---|---|
| private File dir | |
| env | back to summary |
|---|---|
| private Environment env | |
| error | back to summary |
|---|---|
| private File error | |
| failOnError | back to summary |
|---|---|
| private boolean failOnError | |
| fork | back to summary |
|---|---|
| private boolean fork | |
| incompatibleWithSpawn | back to summary |
|---|---|
| private boolean incompatibleWithSpawn | |
| input | back to summary |
|---|---|
| private File input | |
| inputString | back to summary |
|---|---|
| private String inputString | |
| newEnvironment | back to summary |
|---|---|
| private boolean newEnvironment | |
| output | back to summary |
|---|---|
| private File output | |
| perm | back to summary |
|---|---|
| private Permissions perm | |
| redirector | back to summary |
|---|---|
| protected Redirector redirector | |
| redirectorElement | back to summary |
|---|---|
| protected RedirectorElement redirectorElement | |
| resultProperty | back to summary |
|---|---|
| private String resultProperty | |
| spawn | back to summary |
|---|---|
| private boolean spawn | |
| timeout | back to summary |
|---|---|
| private Long timeout | |
| TIMEOUT_MESSAGE | back to summary |
|---|---|
| private static final String TIMEOUT_MESSAGE | |
| Java | back to summary |
|---|---|
| public Java() Normal constructor | |
| Java | back to summary |
|---|---|
| public Java(Task owner) create a bound task
| |
| addAssertions | back to summary |
|---|---|
| public void addAssertions(Assertions asserts) Add assertions to enable in this program (if fork=true).
| |
| addConfiguredRedirector | back to summary |
|---|---|
| public void addConfiguredRedirector(RedirectorElement redirectorElement) Add a
| |
| addEnv | back to summary |
|---|---|
| public void addEnv(Environment. Add an environment variable. Will be ignored if we are not forking a new VM.
| |
| addSysproperty | back to summary |
|---|---|
| public void addSysproperty(Environment. Add a system property.
| |
| addSyspropertyset | back to summary |
|---|---|
| public void addSyspropertyset(PropertySet sysp) Add a set of properties as system properties.
| |
| checkConfiguration | back to summary |
|---|---|
| protected void checkConfiguration() throws BuildException Check configuration.
| |
| clearArgs | back to summary |
|---|---|
| public void clearArgs() Clear out the arguments to this java task. | |
| createArg | back to summary |
|---|---|
| public Commandline. Add a command-line argument.
| |
| createBootclasspath | back to summary |
|---|---|
| public Path createBootclasspath() Add a path to the bootclasspath.
| |
| createClasspath | back to summary |
|---|---|
| public Path createClasspath() Add a path to the classpath.
| |
| createJvmarg | back to summary |
|---|---|
| public Commandline. Adds a JVM argument.
| |
| createModulepath | back to summary |
|---|---|
| public Path createModulepath() Add a path to the modulepath.
| |
| createPermissions | back to summary |
|---|---|
| public Permissions createPermissions() Set the permissions for the application run inside the same JVM.
| |
| createUpgrademodulepath | back to summary |
|---|---|
| public Path createUpgrademodulepath() Add a path to the upgrademodulepath.
| |
| createWatchdog | back to summary |
|---|---|
| protected ExecuteWatchdog createWatchdog() throws BuildException Create the Watchdog to kill a runaway process.
| |
| execute | back to summary |
|---|---|
| public void execute() throws BuildException Overrides org. Do the execution.
| |
| executeJava | back to summary |
|---|---|
| public int executeJava() throws BuildException Do the execution and return a return code.
| |
| executeJava | back to summary |
|---|---|
| protected int executeJava(CommandlineJava commandLine) Execute the specified CommandlineJava.
| |
| fork | back to summary |
|---|---|
| private int fork(String[] command) throws BuildException Executes the given source-file or classname with the given arguments in a separate VM.
| |
| getCommandLine | back to summary |
|---|---|
| public CommandlineJava getCommandLine() Accessor to the command line.
| |
| getSysProperties | back to summary |
|---|---|
| public CommandlineJava. Get the system properties of the command line.
| |
| handleErrorFlush | back to summary |
|---|---|
| protected void handleErrorFlush(String output) Overrides org. Handle output sent to System.err and flush the stream. | |
| handleErrorOutput | back to summary |
|---|---|
| protected void handleErrorOutput(String output) Overrides org. Handle output sent to System.err. | |
| handleFlush | back to summary |
|---|---|
| protected void handleFlush(String output) Overrides org. Pass output sent to System.out to specified output file. | |
| handleInput | back to summary |
|---|---|
| public int handleInput(byte[] buffer, int offset, int length) throws IOException Overrides org. Handle an input request by this task.
| |
| handleOutput | back to summary |
|---|---|
| protected void handleOutput(String output) Overrides org. Pass output sent to System.out to specified output file. | |
| log | back to summary |
|---|---|
| private void log(Throwable t) Log the specified Throwable.
| |
| maybeSetResultPropertyValue | back to summary |
|---|---|
| protected void maybeSetResultPropertyValue(int result) Helper method to set result property to the passed in value if appropriate.
| |
| run | back to summary |
|---|---|
| private void run(CommandlineJava command) throws BuildException Executes the given classname with the given arguments as it were a command line application.
| |
| run | back to summary |
|---|---|
| protected void run(String classname, Vector<String> args) throws BuildException Executes the given classname with the given arguments as if it were a command line application.
| |
| setAppend | back to summary |
|---|---|
| public void setAppend(boolean append) If true, append output to existing file.
| |
| setArgs | back to summary |
|---|---|
| public void setArgs(String s) Deprecated: use nested arg instead. Set the command line arguments for the class.
| |
| setClassname | back to summary |
|---|---|
| public void setClassname(String s) throws BuildException Set the Java class to execute.
| |
| setClasspath | back to summary |
|---|---|
| public void setClasspath(Path s) Set the classpath to be used when running the Java class.
| |
| setClasspathRef | back to summary |
|---|---|
| public void setClasspathRef(Reference r) Set the classpath to use by reference.
| |
| setCloneVm | back to summary |
|---|---|
| public void setCloneVm(boolean cloneVm) If set, system properties will be copied to the cloned VM--as well as the bootclasspath unless you have explicitly specified a bootclasspath. Doesn't have any effect unless fork is true.
| |
| setDir | back to summary |
|---|---|
| public void setDir(File d) Set the working directory of the process.
| |
| setDiscardError | back to summary |
|---|---|
| public void setDiscardError(final boolean discard) Whether error output should be discarded. Defaults to false.
| |
| setDiscardOutput | back to summary |
|---|---|
| public void setDiscardOutput(final boolean discard) Whether output should be discarded. Defaults to false.
| |
| setError | back to summary |
|---|---|
| public void setError(File error) Set the File to which the error stream of the process is redirected.
| |
| setErrorProperty | back to summary |
|---|---|
| public void setErrorProperty(String errorProperty) Set the property name whose value should be set to the error of the process.
| |
| setFailonerror | back to summary |
|---|---|
| public void setFailonerror(boolean fail) If true, then fail if the command exits with a returncode other than zero.
| |
| setFork | back to summary |
|---|---|
| public void setFork(boolean s) If true, execute in a new VM.
| |
| setInput | back to summary |
|---|---|
| public void setInput(File input) Set the input to use for the task.
| |
| setInputString | back to summary |
|---|---|
| public void setInputString(String inputString) Set the string to use as input.
| |
| setJar | back to summary |
|---|---|
| public void setJar(File jarfile) throws BuildException Set the location of the JAR file to execute.
| |
| setJvm | back to summary |
|---|---|
| public void setJvm(String s) Set the command used to start the VM (only if forking).
| |
| setJvmargs | back to summary |
|---|---|
| public void setJvmargs(String s) Set the command line arguments for the JVM.
| |
| setJVMVersion | back to summary |
|---|---|
| public void setJVMVersion(String value) Set the JVM version.
| |
| setLogError | back to summary |
|---|---|
| public void setLogError(boolean logError) Set whether error output of exec is logged. This is only useful when output is being redirected and error output is desired in the Ant log.
| |
| setMaxmemory | back to summary |
|---|---|
| public void setMaxmemory(String max) Corresponds to -mx or -Xmx depending on VM version.
| |
| setModule | back to summary |
|---|---|
| public void setModule(String module) throws BuildException Set the Java module to execute.
| |
| setModulepath | back to summary |
|---|---|
| public void setModulepath(Path mp) Set the modulepath to be used when running the Java class.
| |
| setModulepathRef | back to summary |
|---|---|
| public void setModulepathRef(Reference r) Set the modulepath to use by reference.
| |
| setNewenvironment | back to summary |
|---|---|
| public void setNewenvironment(boolean newenv) If true, use a completely new environment. Will be ignored if we are not forking a new VM.
| |
| setOutput | back to summary |
|---|---|
| public void setOutput(File out) Set the File to which the output of the process is redirected.
| |
| setOutputproperty | back to summary |
|---|---|
| public void setOutputproperty(String outputProp) Set the property name whose value should be set to the output of the process.
| |
| setResultProperty | back to summary |
|---|---|
| public void setResultProperty(String resultProperty) Set the name of the property in which the return code of the command should be stored. Only of interest if failonerror=false.
| |
| setSourceFile | back to summary |
|---|---|
| public void setSourceFile(final String sourceFile) throws BuildException Set the Java source-file to execute. Support for single file source program execution, in Java, is only available since Java 11.
| |
| setSpawn | back to summary |
|---|---|
| public void setSpawn(boolean spawn) Set whether or not you want the process to be spawned; default is not spawned.
| |
| setTimeout | back to summary |
|---|---|
| public void setTimeout(Long value) Set the timeout in milliseconds after which the process will be killed.
| |
| setupCommandLine | back to summary |
|---|---|
| private void setupCommandLine(Execute exe, String[] command) Set the command line for the exe.
On VMS, hands off to | |
| setupCommandLineForVMS | back to summary |
|---|---|
| private void setupCommandLineForVMS(Execute exe, String[] command) On VMS platform, we need to create a special java options file containing the arguments and classpath for the java command. The special file is supported by the "-V" switch on the VMS JVM. | |
| setupEnvironment | back to summary |
|---|---|
| private void setupEnvironment(Execute exe) Set up our environment variables.
| |
| setupExecutable | back to summary |
|---|---|
| private void setupExecutable(Execute exe, String[] command) Do all configuration for an executable that
is common across the | |
| setupRedirector | back to summary |
|---|---|
| protected void setupRedirector() Set up properties on the redirector that we needed to store locally. | |
| setupWorkingDir | back to summary |
|---|---|
| private void setupWorkingDir(Execute exe) Set the working dir of the new process.
| |
| spawn | back to summary |
|---|---|
| private void spawn(String[] command) throws BuildException Executes the given classname with the given arguments in a separate VM.
| |