ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@apache.org>
Subject Re: Taskdef NullPointerException
Date Thu, 18 May 2006 11:57:20 GMT
subir bhaumik wrote:
> Hi
>   
>      I am trying to execute a simple java code for a build using
>       Ant API rather than writing build.xml.When executing the code
>   it throws NullPointerException for the line
>   
>   tinstaller.setClasspath(class_path); 
>   
>   in the code.
>   It is for the class  "org.apache.tools.ant.taskdefs.Taskdef;"
>   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
>   
>   Exception in thread "main" java.lang.NullPointerException
>           at org.apache.tools.ant.taskdefs.DefBase.setClasspath(DefBase.java:90)
>           at Installer.main(Installer.java:35)
>   

This exactly the kind of problem you will find the ant source so helpful 
for. Why not look at the line where the fault happened, work out what 
preconditions are not being met, and fix your program.

-steve

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


Mime
View raw message