PR java/14070: gij and -jar argument should set the manifest Class-path recursively

Tom Tromey tromey@redhat.com
Tue Nov 2 21:08:00 GMT 2004


>>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:

Andrew> OK, this is the new, improved, low-fat version of the patch.
Andrew> urls was a Vector, and I've changed it to a LinkedHashSet.  When we
Andrew> add a URL, we first check that we haven't added it already, and this
Andrew> prevents the loader from looping.

I don't think this satisfies all the constraints we need to satisfy.

I'm pretty sure there is code out there that assumes that
URLClassLoader.getURLs() will return the exact URLs given to
URLClassLoader, in the exact order.  I think this patch changes this.


The other question I have is about ordering.  Suppose you create a
URLClassLoader with a.jar and b.jar.  Suppose a.jar has a
Class-Path entry pointing to a2.jar.  And finally suppose you are
looking for a resource named R which appears in both a2.jar and b.jar.
Which is found?

I'm sure this case sounds dumb, but I'm picturing the hours of
debugging that will happen when we run into it in the field... better
to be compatible up front.

Tom



More information about the Java-patches mailing list