ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <>
Subject RE: problem with accesing listeners
Date Thu, 27 Jan 2005 22:42:05 GMT
> From: Radha Sangal []
> This should be easy. I am trying to add my listener class
> MyBuildListener but ant doesn't seem to find it. I tried giving
> paths but still getting same error. This is like some classpath issue
> I m following this tutorial
> C:\EclipsePRWorkspace\LogDatabase>ant -debug -listener
> c:\EclipsePRWorkspace\LogDatabase\bin\MyBuildListener

Hmmm, you should try to familiarize yourself with classpaths and class

You need to:
1) Compile your listener into a directory.
2) Put this directory in your CLASSPATH
3) Specify our listener class name, not file path.

For example, you listener is in package, and its class name
is MyBuildListener. It's full class name is thus

Assume you compile it into /usr/me/classes. You'll then have a
/usr/me/classes/foo/bar/MyBuildListener.class file.

You do at the command prompt:

set CLASSPATH=/usr/me/classes

and then ant -listener

and you're done ;-) --DD

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

View raw message