}
// case when the URI points directly to the jar resource
try
{
ResourceProvider provider =
new JarResourceProvider(factory.createResource(uri));
return provider.createResource("/").createRelative(path);
}
catch(UnsupportedURIException e)
{
URISyntaxException ex = new URISyntaxException(uri.toString(), "cannot create resource");
ex.initCause(e);