[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] Re: PR java/14070: gij and -jar argument should set the man
From: |
Andrew Haley |
Subject: |
[cp-patches] Re: PR java/14070: gij and -jar argument should set the manifest Class-path recursively |
Date: |
Mon, 1 Nov 2004 16:48:10 +0000 |
Tom Tromey writes:
> >>>>> "Andrew" == Andrew Haley <address@hidden> writes:
>
> Andrew> Does anoyone understand what other Java class libraries to do detect
> Andrew> such pathological cases? Somehow, even in a complex hierarchy of
> Andrew> class loaders it must be possible to detect the sitiation where one
> Andrew> delegates to another which delgates back to the first, etc, etc.
>
> The only way to get a class loader delegation loop is to write a
> custom class loader that has its own delegation approach. The
> standard class loaders only delegate to their parent, and the parent
> is set by the constructor and is private.
>
> Eclipse 2 had a class loader that could potentially get into
> delegation loops. As I recall it solved this problem by having a flag
> that was set so it could tell when a circular call occurred.
>
> In the Class-Path case, it probably suffices to keep a set of all seen
> URLs, then stop when you see one for a second time. I think this will
> work fine as all the action is taking place inside of a single
> URLClassLoader.
Okay, I think I see. So, at entry to the URLClassLoader you create a
hash table and then when you're looping around all the sub-loaders you
check the hash table to see where you've been. I'll try it.
Andrew.
- [cp-patches] PR java/14070: gij and -jar argument should set the manifest Class-path recursively, Andrew Haley, 2004/11/01
- [cp-patches] PR java/14070: gij and -jar argument should set the manifest Class-path recursively, Andrew Haley, 2004/11/01
- [cp-patches] Re: PR java/14070: gij and -jar argument should set the manifest Class-path recursively, Tom Tromey, 2004/11/01
- [cp-patches] Re: PR java/14070: gij and -jar argument should set the manifest Class-path recursively,
Andrew Haley <=
- [cp-patches] Re: PR java/14070: gij and -jar argument should set the manifest Class-path recursively, Tom Tromey, 2004/11/01
- [cp-patches] Re: PR java/14070: gij and -jar argument should set the manifest Class-path recursively, Andrew Haley, 2004/11/01
- [cp-patches] Re: PR java/14070: gij and -jar argument should set the manifest Class-path recursively, Andrew Haley, 2004/11/02
- [cp-patches] Re: PR java/14070: gij and -jar argument should set the manifest Class-path recursively, Tom Tromey, 2004/11/02
- [cp-patches] Re: PR java/14070: gij and -jar argument should set the manifest Class-path recursively, Mark Wielaard, 2004/11/02
- [cp-patches] Re: PR java/14070: gij and -jar argument should set the manifest Class-path recursively, Andrew Haley, 2004/11/03
- [cp-patches] Re: PR java/14070: gij and -jar argument should set the manifest Class-path recursively, Andrew Haley, 2004/11/03
- [cp-patches] Re: PR java/14070: gij and -jar argument should set the manifest Class-path recursively, Tom Tromey, 2004/11/08
- [cp-patches] Re: PR java/14070: gij and -jar argument should set the manifest Class-path recursively, Andrew Haley, 2004/11/08
[cp-patches] Re: PR java/14070: gij and -jar argument should set the manifest Class-path recursively, Andrew Pinski, 2004/11/01