ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <DDevie...@lgc.com>
Subject RE: Ant should have an ext directory
Date Thu, 20 Jan 2005 19:08:35 GMT
> -----Original Message-----
> From: Dick, Brian E. [mailto:Brian.Dick@FMR.com]
> 
> The -lib switch sucks for everyday use. You don't want to modify the
> distributed code because the next time you upgrade you have to do it
all
> over again.
> 
> An ext directory is self-documenting and easy to upgrade.
> 
> 1) Install new distribution.
> 2) Copy ext from old distribution to new distribution.
> 3) Get back to work.
> 
> Why did Sun add an ext directory to the java runtime? Because it was
an
> easy and elegant solution for handling library extensions. Ant should
> learn from Sun's mistakes.

Sorry to pick up on this thread so late Dick ;-) But I just wanted
to mention that the JRE's ext directory has one drawback, i.e. its
'loaded' by the Extension Class Loader, which sits underneath the
Application Class Loader (the one dealing with the user CLASSPATH),
and this is have some consequences because of the delegation model
for class loaders. Ant would 'see' the extensions you'd put in ext/,
but not the reverse, i.e. an extension's class doing a
Class.forName("org.apache.tools.ant.Project") would fail to find
the Project class (unless explicitly using the ContextClassLoader
that Ant sets up), or fail to find dependent classes on the CLASSPATH.

Beside this, lots of useful advice on this thread ;-) --DD

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


Mime
View raw message