ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject Re: class static initialization and classloaders
Date Thu, 10 May 2001 13:34:46 GMT
At 11:27  10/5/01 +1000, Conor MacNeill wrote:
>Resolution is not the issue, I believe. I experimented by setting the
>AntClassLoader to always resolve regardles of whether it was requested by
>the caller. It made no difference - the static initialisers were not run.
>BTW, why did you say class resolution when you really meant class

ahh -- it is a disease I guess. "resolution" was the term I associate with
load, link and initialize from my compiler hacking days .. it is
unfortunate that java uses the term "resolve" to mean "link". IIRC the JLS
actually indicates that this is a misnomer ... oh well ;)

>> * force resolution of classes on loading to identify classloader
>>   issues early. (At least in global classloader).
>I do not believe resolveClass() and the initialize parameter of
>Class.forName achieve the same thing (linking v initialization).  Besides
>the latter is JDK1.2+ so generally not an option for Ant 1.x.




| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |

View raw message