Loading entry in a jar file [message #535444] |
Sun, 23 May 2010 12:31  |
Eclipse User |
|
|
|
Hi,
I am trying to load an entry from inside a jar file.
e.g. from file:/c:/contents.jar!/com/demo/Test.employee
URI emfURI = URI.createURI(uri.toString());
Resource resource = mResourceFactory.createResource(uri, null);
resource.load(new HashMap<Object, Object>());
I was expecting this to work. But it fails saying FileNotFound.
I tried following value for uri:
1) uri = "jar:file:/c:/contents.jar!/com/demo/Test.employee"
2) uri = "file:/c:/contents.jar!/com/demo/Test.employee"
I can load using inputStream from jar for the jar entry but i expected above code to work.
Am i missing something ?
Thanks and Regards,
Ashwani Kr Sharma
|
|
|
|
Re: Loading entry in a jar file [message #535484 is a reply to message #535447] |
Sun, 23 May 2010 22:30  |
Eclipse User |
|
|
|
Hi Ed,
Yes, the option 1 worked. I was using a custom Resouce creator, which was not supporting loading from jar file, hence it failed.
Option 1 works.
Thanks for reply.
Regards,
Ashwani Kr Sharma
|
|
|
Powered by
FUDForum. Page generated in 0.08331 seconds