This discussion is archived
0 Replies Latest reply: Oct 3, 2008 12:46 AM by 843844 RSS

Getting Error while using CallTarget class

843844 Newbie
Currently Being Moderated
I am getting following error while using the CallTarget.

"Exception in thread "main" java.lang.NullPointerException
at org.apache.tools.ant.taskdefs.Ant.init(Ant.java:147)
at org.apache.tools.ant.taskdefs.CallTarget.init(CallTarget.java:85)
at org.apache.tools.ant.taskdefs.CallTarget.setTarget(CallTarget.java:150
at AntCallTarget.main(AntCallTarget.java:7)"

Can anyone please help me solve this problem.
The code where i am getting this error is

          CallTarget antCall = new CallTarget();
          antCall.setTarget("Main");