ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <>
Subject Re: Using Ant Programmatically
Date Mon, 22 May 2006 09:50:32 GMT
subir bhaumik wrote:
> Hello,
>   I am posting to this group since I am not getting any guidance apart 
> from 
>   "look at ant source code".
>   I am trying to use ant programmatically using the Ant API.
>   When executing the code
>     it throws NullPointerException for the line
>     tinstaller.setClasspath(class_path); 
>     in the code.
>     It is for the class  ";"
>     But for the other taskdefs e.g. Javac its O.K.
>     Is there any problem to load classpath in Taskdef object?
>     If not then where's the wrong with the code? 
>     The Exception


The reason we are all saying "look at the code" is because nobody else 
has encountered this situation. If we were trying to do what you are 
trying to do, then I'd probably set a breakpoint in my code before I 
call this stuff, and find out why an NPE is being thrown. On the 
particular line, something is being derefed that is null. Find out what 
it is, find out why it isnt being set, make sure that it gets set and 

Nobody can debug your code remotely, and if you are using ant 
programmatically, you have to expect less support from ant-from-XML, as 
that is how it is normally used.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message