How do I measure the time it taks for the task "java" to complete?

Erik Hatcher

You could write a BuildListener to observe the tasks being executed, and diff the time between taskStarted and taskFinished. Just write a class that implements org.apache.tools.ant.BuildListener and from the commandline:

  ant -listener com.ant.YourListener
You can use 'instanceof' to determine the task that is being run.