ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Problem using org.apache.tools.ant.taskdefs.Java
Date Wed, 30 Jun 2004 06:06:37 GMT
On Wed, 30 Jun 2004, Robert Mark Bram <relaxedrob@optusnet.com.au>
wrote:

>        // Run common.guitools.Test as a Java task
>        Java testTask = new Java();

Ant usually does more than that, in particular it invokes setProject
with a valid project reference - and without actually checking the
code I'd bet the NPE you see is Ant trying to use that project
reference.

         Java testTask = (Java) getProject().createTask("java");

would be the better approach.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message