Save This Page
Home » apache-ant-1.7.1-src » org.apache.tools » ant » taskdefs » [javadoc | source]
org.apache.tools.ant.taskdefs
public class: ExecuteJava [javadoc | source]
java.lang.Object
   org.apache.tools.ant.taskdefs.ExecuteJava

All Implemented Interfaces:
    Runnable, TimeoutObserver

Execute a Java class.
Method from org.apache.tools.ant.taskdefs.ExecuteJava Summary:
execute,   fork,   killedProcess,   run,   setClasspath,   setJavaCommand,   setOutput,   setPermissions,   setSystemProperties,   setTimeout,   setupCommandLineForVMS,   timeoutOccured
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.tools.ant.taskdefs.ExecuteJava Detail:
 public  void execute(Project project) throws BuildException 
    Execute the Java class against the specified Ant Project.
 public int fork(ProjectComponent pc) throws BuildException 
    Run 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.
 public synchronized boolean killedProcess() 
    Get whether the process was killed.
 public  void run() 
    Run this ExecuteJava in a Thread.
 public  void setClasspath(Path p) 
    Set the classpath to be used when running the Java class.
 public  void setJavaCommand(Commandline javaCommand) 
    Set the Java "command" for this ExecuteJava.
 public  void setOutput(PrintStream out) 
Deprecated! since - 1.4.x. manage output at the task level.

    Set the stream to which all output (System.out as well as System.err) will be written.
 public  void setPermissions(Permissions permissions) 
    Set the permissions for the application run.
 public  void setSystemProperties(CommandlineJava.SysProperties s) 
    Set the system properties to use when running the Java class.
 public  void setTimeout(Long timeout) 
    Set the timeout for this ExecuteJava.
 public static  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.
 public synchronized  void timeoutOccured(Watchdog w) 
    Mark timeout as having occurred.