Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » incorrect URL from thread.getContextClassLoader().getResource()
incorrect URL from thread.getContextClassLoader().getResource() [message #109337] Fri, 09 May 2008 12:01
Eclipse UserFriend
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
Previous Topic:Equinox Application Model Demo
Next Topic:Building a true application platform
Goto Forum:
  


Current Time: Tue Oct 19 13:29:38 GMT 2021

Powered by FUDForum. Page generated in 0.01264 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top