org.apache.tools.ant.taskdefs

Class ExecuteJava

public class ExecuteJava extends Object implements Runnable, TimeoutObserver

Since: Ant 1.2

Method Summary
voidexecute(Project project)
intfork(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.
booleankilledProcess()
voidrun()
voidsetClasspath(Path p)
Set the classpath to be used when running the Java class
voidsetJavaCommand(Commandline javaCommand)
voidsetOutput(PrintStream out)
All output (System.out as well as System.err) will be written to this Stream.
voidsetPermissions(Permissions permissions)
Permissions for the application run.
voidsetSystemProperties(CommandlineJava.SysProperties s)
voidsetTimeout(Long timeout)
voidtimeoutOccured(Watchdog w)

Method Detail

execute

public void execute(Project project)

fork

public 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.

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)

Since: Ant 1.5

Copyright