incorrect URL from thread.getContextClassLoader().getResource() [message #109337] |
Fri, 09 May 2008 12:01 |
Eclipse User |
|
|
|
Originally posted by: rgokulakrishnan.novell.com
Hi,
We using Equinox for our application. One of the third party jars used in
this application, requires the JAR file name for its self integrity test.
It obtains the JAR file name using the following code pattern:
Thread thread = Thread.currentThread();
URL url = thread.getContextClassLoader().getResource(someClass.class);
The above code when run outside OSGi environment, gives url resembling
following output:
jar:file:/<location of jar file>/someJar.jar!/someClass.class
On running the same code in OSGi, we get URL resembling following output:
bundleresource://18/someClass.class
where 18 is bundle id.
The 3rd party JAR file has been included in the same bundle using
Bundle-classpath.
How can we get the location of JAR file in OSGi environment?
Thanks in advance
Gokul
|
|
|
Powered by
FUDForum. Page generated in 0.03330 seconds