ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <>
Subject Re: [PROPOSAL] No need for CLASSPATH in ANT1
Date Wed, 07 Nov 2001 15:13:24 GMT
From: "Peter Donald" <>

> 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 address at

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

View raw message