hi,
i want to refer to a resource stored in the jar files found in the classpath
usually, jar must wrap a full url, specified with scheme+path :
jar:file:///path/to/my.jar!/path/to/my/resource
any tip to remove the reference to my.jar ?
(i just need to store somewhere "jar:/path/to/my/resource" and tell a
loader to retrieve it)
or do i have to write my own loader that performs the lookup ?

Signature
Cordialement,
///
(. .)
-----ooO--(_)--Ooo-----
| Philippe Poulard |
-----------------------
Michael Rauscher - 17 May 2005 06:26 GMT
Philippe Poulard schrieb:
> hi,
>
> i want to refer to a resource stored in the jar files found in the
> classpath
Have a look at Class#getResource and ClassLoader#getResource.
Bye
Michael
Philippe Poulard - 17 May 2005 08:20 GMT
> Philippe Poulard schrieb:
>
[quoted text clipped - 7 lines]
> Bye
> Michael
hi,
I already have used this classes.
I just want to know whether there is a syntax for jar URLs that allow to
load a resource without specifying the location of the jar file, or not
When I parse an URL with "jar:myJar!/path/to/resource" it fails
So the solution is to parse with an URI, check if the scheme is opaque
and equal to "jar" and use Class#getResource and ClassLoader#getResource
to do the job

Signature
Cordialement,
///
(. .)
-----ooO--(_)--Ooo-----
| Philippe Poulard |
-----------------------