org.apache.tools.ant.taskdefs

Class ExecuteJava

Implemented Interfaces:
Runnable, TimeoutObserver

public class ExecuteJava
extends java.lang.Object
implements Runnable, TimeoutObserver

Since:
Ant 1.2

Method Summary

void
execute(Project project)
int
fork(ProjectComponent pc)
Runs the Java command in a separate VM, this does not give you the full flexibility of the Java task, but may be enough for simple needs.
boolean
killedProcess()
void
run()
void
setClasspath(Path p)
Set the classpath to be used when running the Java class
void
setJavaCommand(Commandline javaCommand)
void
setOutput(PrintStream out)
Deprecated. manage output at the task level
void
setPermissions(Permissions permissions)
Permissions for the application run.
void
setSystemProperties(CommandlineJava.SysProperties s)
void
setTimeout(Long timeout)
void
timeoutOccured(Watchdog w)

Method Details

execute

public void execute(Project project)
            throws BuildException

fork

public int fork(ProjectComponent pc)
            throws BuildException
Runs the Java command in a separate VM, this does not give you the full flexibility of the Java task, but may be enough for simple needs.
Since:
Ant 1.6.3

killedProcess

public boolean killedProcess()
Since:
1.19, Ant 1.5

run

public void run()
Since:
Ant 1.5

setClasspath

public void setClasspath(Path p)
Set the classpath to be used when running the Java class
Parameters:
p - an Ant Path object containing the classpath.

setJavaCommand

public void setJavaCommand(Commandline javaCommand)

setOutput

public void setOutput(PrintStream out)

Deprecated. manage output at the task level

All output (System.out as well as System.err) will be written to this Stream.

setPermissions

public void setPermissions(Permissions permissions)
Permissions for the application run.
Parameters:
permissions -
Since:
Ant 1.6

setSystemProperties

public void setSystemProperties(CommandlineJava.SysProperties s)

setTimeout

public void setTimeout(Long timeout)
Since:
Ant 1.5

timeoutOccured

public void timeoutOccured(Watchdog w)
Specified by:
timeoutOccured in interface TimeoutObserver
Since:
Ant 1.5

Copyright B) 2000-2006 Apache Software Foundation. All Rights Reserved.