Thomas Watson wrote:
This is probably because the ClassLoader.getResources method is final on J2SE 1.4 and earlier. In J2SE 1.5 they removed the 'final' from this method. This makes it impossible to implement a "correct" bundle classloader on J2SE 1.4 and earlier WRT ClassLoader.getResources. The implementation of the final ClassLoader.getResources method always checks the parent classloader first, there is no way for the OSGi Bundle class loader to override this behavior. We have the exact same situation in Equinox.

Ugly.

Tom, so do you have some check in place to do the correct thing when running on 1.5 as opposed to < 1.5 ? If so, what approach do you use?

-> richard

Tom





"Chris Custine" <[EMAIL PROTECTED]> 12/14/2006 12:37 AM
Please respond to
felix-dev@incubator.apache.org


To
felix-dev@incubator.apache.org
cc

Subject
bundle.getResources behavior






My understanding of the OSGi spec is that Bundle.getResources() should only
look in the System classpath if the package name is listed in the
org.osgi.framework.bootdelegation property, is that correct?  I am working
on a problem where Felix is returning a resource from a non-bundle jar
(Felix is embedded) that is on the main application classpath.  Any ideas?

Thanks,
Chris


Reply via email to