From: "Peter Donald" <[EMAIL PROTECTED]>
> On Wed, 7 Nov 2001 09:34, Jose Alberto Fernandez wrote:
> >
> > What kind of tasks are we talking about. Can someone explain?
> > As far as I know, there is nothing in ANT1's API that can be thought to be
> > guaranteeing that classes must be loaded from the CLASSPATH.
>
> Most tasks that need to create their own ClassLoaders will do something like
>
> URLClassLoader classLoader = new URLClassLoader( myURLs );
>
> where they would need to do something like
>
> URLClassLoader classLoader = new URLClassLoader( myURLs,
> this.getClass().getClassLoader() );
>
> if they wanted the ant runtime classes to be included in classLoader (which
> many do need). It would not be a good idea to break all tasks that create
> their own classloaders (many of which do)..
>
Thanks Peter, for providing the example I was asking. As I said in another
message
I do not want to keep insisting on this issue, but if I look at the Project API
(i.e., the public methods provded) there is right there:
public ClassLoader getCoreLoader();
which makes me think that correctly written tasks should be using at least
something like:
URLClassLoader classLoader = new URLClassLoader( myURLs,
this.getProject().getCoreLoader() );
this is why I considered that such tasks were broken as oppose of we changing
things.
But granted there may be tasks out there that may break.
Jose Alberto
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>