
Signature
Andrew Thompson
http://www.athompson.info/andrew/
> In addition to loading loose classes
> lazily, you *might* (if it makes sense) also load resources from
> Jar files lazily. Do not add them to the archives attribute
> (obviously) and simply form a complete URL to the jar/resource
> when accessing it.
The jar is sent as a whole over the network. A web server does not
understand a URL pointing into a jar, can not extract the class or
resource out of a jar and can not individually send a class or
resource from a jar. The class loader uses a URL pointing to the whole
jar to load the whole jar if needed. Once the jar has been loaded the
class loader extracts the particular resource from it.
If you want to load individual classes or resources do not put them in
a jar.
Andrew Thompson - 17 Oct 2007 00:50 GMT
On Oct 17, 7:23 am, "a24...@googlemail.com" <a24...@googlemail.com>
wrote:
> > In addition to loading loose classes
> > lazily, you *might* (if it makes sense) also load resources from
[quoted text clipped - 6 lines]
> resource out of a jar and can not individually send a class or
> resource from a jar. ...
Which is not a problem, if it is 'one resource per jar'.
The OP mentioned lazy loading, which implies either
a lot of, or large, resources. If the latter, the
Jar might make sense - or at least, Jar(s) for the
largest resource(s).
Andrew T.