Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » what's the difference between getResource and getEntry in Bundle interface
what's the difference between getResource and getEntry in Bundle interface [message #709554] Thu, 04 August 2011 02:53 Go to next message
Liang Missing name is currently offline Liang Missing nameFriend
Messages: 6
Registered: August 2011
Location: Wuhan, China
Junior Member
The fowlloing two methods are defined in org.osgi.framework.Bundle:
URL getResource(String name);
URL getEntry(String path);

So my question is what's the difference between these two methods and what is an "Entry" in a bundle?
Re: what's the difference between getResource and getEntry in Bundle interface [message #709961 is a reply to message #709554] Thu, 04 August 2011 14:33 Go to previous messageGo to next message
Thomas Watson is currently offline Thomas WatsonFriend
Messages: 503
Registered: July 2009
Senior Member
getResource uses the bundle's class loader to load a resource. This resource could come from imported constraints (Import-Package, Require-Bundle) or from the local bundle classpath.

getEntry only searches the bundles jar files itself and does not consider any constraints or the bundle's class path (Bundle-ClassPath header).

HTH

Tom.
Re: what's the difference between getResource and getEntry in Bundle interface [message #710032 is a reply to message #709961] Thu, 04 August 2011 15:51 Go to previous message
Liang Missing name is currently offline Liang Missing nameFriend
Messages: 6
Registered: August 2011
Location: Wuhan, China
Junior Member
Tom,

Thanks very much for the explanation.
Previous Topic:p2 publisher - error message
Next Topic:ClassCastException, totally weird
Goto Forum:
  


Current Time: Sat Apr 20 04:14:58 GMT 2024

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

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

Back to the top