ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <DDevie...@lgc.com>
Subject RE: problem with accesing listeners
Date Thu, 27 Jan 2005 22:42:05 GMT
> From: Radha Sangal [mailto:Radha.Sangal@pega.com]
> 
> This should be easy. I am trying to add my listener class
> MyBuildListener but ant doesn't seem to find it. I tried giving
complete
> paths but still getting same error. This is like some classpath issue
?
> 
> I m following this tutorial
> http://www.onjava.com/pub/a/onjava/2001/02/22/open_source.html?page=3
> 
> C:\EclipsePRWorkspace\LogDatabase>ant -debug -listener
> c:\EclipsePRWorkspace\LogDatabase\bin\MyBuildListener

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

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 foo.bar, and its class name
is MyBuildListener. It's full class name is thus
foo.bar.MyBuildListener.

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 foo.bar.MyBuildListener

and you're done ;-) --DD

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


Mime
View raw message