ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cory Wandling" <c...@ObjectDynamics.com>
Subject Re: Exec Class cast exception
Date Wed, 09 Aug 2000 18:05:42 GMT
Try debugging it by getting back an Object asking for its class and then
printing that out.

final Object cmd = project.createTask("exec");
System.out.println(cmd.getClass().getName());

Cory

----- Original Message -----
From: Doremieux, Olivier <Olivier.Doremieux@fc.celera.com>
To: <ant-user@jakarta.apache.org>
Sent: Wednesday, August 09, 2000 12:44 PM
Subject: Exec Class cast exception


> I am trying to create my own task, but with the following line I am
getting
> a ClassCastException. What am I doing wrong
>
>     final Exec cmd = (Exec)project.createTask("exec");
>
> java.lang.ClassCastException: org.apache.tools.ant.taskdefs.ExecTask
>         at signtoolTask.execute(signtoolTask.java:21)
>         at org.apache.tools.ant.Target.execute(Target.java:132)
>         at org.apache.tools.ant.Project.runTarget(Project.java:720)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:451)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:425)
>         at org.apache.tools.ant.Main.runBuild(Main.java:298)
>         at org.apache.tools.ant.Main.main(Main.java:119)
>
> Thank you
>
> Olivier


Mime
View raw message