|How to access a resource from a jar-file? [message #741498]
||Wed, 19 October 2011 15:34
| Geronimo M.H.
Registered: October 2011
may be I missed something.
I'd like to load a resource from a jarfile, that's attached to a plugins classpath (in manifest).
I tried to overload a Classloader at plugins activator, where I use FileLocator.findEntries(...)
At activation time, I've no idea about how to access the classpath entries from plugins manifest.
When I step down the FileLocator.findEntries(...), I hit BaseData.getEntry(...), where the classpath entries from manifest are resolved.
... but ...
if I got things right, getBundleFile().getEntry(...) resolves files from plugin only, without taking a look at the libraries from classpath.
So without starting to parse the manifest by myself, I think the right point for a patch would be BaseData.getEntry(...) - adding a URL-Classloader for all libraries of the classpath, which then would return the right resource.
... but I don't really like that kindof hakking ...
Is there another way to solve the problem without having to modify eclipse runtime?
Any hint is appreciated.
Powered by FUDForum
. Page generated in 0.13144 seconds