Re: Jar: protocol question
- From: Roedy Green <my_email_is_posted_on_my_website@xxxxxxxxxxxxxx>
- Date: Sun, 30 Oct 2005 05:57:09 GMT
On Sat, 29 Oct 2005 11:20:01 -0400, "Rhino"
<no.offline.contact.please@xxxxxxxxxx> wrote, quoted or indirectly
quoted someone who said :
>Since 'this.getClass().getResource()' will search EVERY jar in the classpath
>for the desired file, it shouldn't be necessary to specify the jar name.
>Therefore, it seems to me that this should be valid notation for indicating
>that the jar name isn't necessary in this case: the bang ('!') in the name
>following the 'file:' suggests to me that the default jar(s), namely all of
>the jars found in the classpath, will be searched for an Images directory
>and a file named foo.gif within that directory.
getResource does a search and gives you a direct url to the Jar where
it found the resource.
If you want to speed that search, use the class-path and index
feature of jar.exe to build a multi-jar index for direct lookup.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
.
- References:
- Jar: protocol question
- From: Rhino
- Jar: protocol question
- Prev by Date: Re: Thunerbird help... [not java related , but please help if you can!]
- Next by Date: Re: protocol question
- Previous by thread: Re: protocol question
- Next by thread: Animation jargon
- Index(es):
Relevant Pages
|