org.apache.tools.ant.taskdefs
Class ExecuteJava

java.lang.Object
  |
  +--org.apache.tools.ant.taskdefs.ExecuteJava
All Implemented Interfaces:
java.lang.Runnable, TimeoutObserver

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

Since:
Ant 1.2

Constructor Summary
ExecuteJava()
           
 
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(java.io.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(java.lang.Long timeout)
           
 void timeoutOccured(Watchdog w)
          Called when the watchdow times out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecuteJava

public ExecuteJava()
Method Detail

setJavaCommand

public void setJavaCommand(Commandline javaCommand)

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.

setSystemProperties

public void setSystemProperties(CommandlineJava.SysProperties s)

setPermissions

public void setPermissions(Permissions permissions)
Permissions for the application run.

Parameters:
permissions -
Since:
Ant 1.6

setOutput

public void setOutput(java.io.PrintStream out)
Deprecated. manage output at the task level

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


setTimeout

public void setTimeout(java.lang.Long timeout)
Since:
Ant 1.5

execute

public void execute(Project project)
             throws BuildException
BuildException

run

public void run()
Specified by:
run in interface java.lang.Runnable
Since:
Ant 1.5

timeoutOccured

public void timeoutOccured(Watchdog w)
Description copied from interface: TimeoutObserver
Called when the watchdow times out.

Specified by:
timeoutOccured in interface TimeoutObserver
Parameters:
w - the watchdog that timed out.
Since:
Ant 1.5

killedProcess

public boolean killedProcess()
Since:
1.19, Ant 1.5

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.

BuildException
Since:
Ant 1.6.3


Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.