ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben <ajoo.em...@gmail.com>
Subject Re: Problem in extending org.apache.tools.ant.taskdefs.Java class
Date Wed, 09 Aug 2006 04:13:59 GMT
Nah. commandline will never get me the hierarchy that I want. java.exe
only accepts a flat set of urls.

What I'm doing is to have a proxy class: MainProxy.

1. A system property will be set (say, set it to "lib") to call MainProxy
2. Another system property is set to the actually class name.
3. when MainProxy takes controll from within the new vm, it reads the
class path tree property (which is "lib" in this case).
4. MainProxy creates a tree class loader that looks recursively into
all jars under lib.
5. MainProxy loads the target class using the tree class loader.
6. MainProxy also needs to set the thread context class loader.

And there it goes.

It's just the commons-logging thing always giving me problem. Had to
do ugly work-around for it.

:-(





On 8/8/06, Stefan Bodewig <bodewig@apache.org> wrote:
> On Mon, 7 Aug 2006, Ben <ajoo.email@gmail.com> wrote:
>
> > I'm talking about the forked version, cuz that's almost the only
> > mode I use. :-)
>
> How do you get your classloader into the forked VM?  What kind of
> changes do you need to make to the task?  Only modify the commandline
> used to start the VM?
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>

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


Mime
View raw message