ClassLoader.getResourceAsStream of resource in external JAR does not work
Hi,
I'm using DM 2.0.0 release.
My application runs as web bundle and I'm trying to read resource from external JAR which was added to Bundle-Classpath and it does not work.
I added to MANIFEST.MF:
Code:
Bundle-ClassPath: .,/tmp/client-config.jar
The resource is a clientinit.0 file in client-config.jar.
The in bundle code:
Code:
ClassLoader cl = this.getClass().getClassLoader();
InputStream in = cl.getResourceAsStream("clientinit.0");
in = cl.getResourceAsStream("/clientinit.0");
I get null for 'in' variable.
When debugging, I see that 'cl' has the /tmp/client-config.jar in its' classpath member.
Please help !!!
Thanks,
Pavel