Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Question regarding class loader and getPackages()

Yes, please ask this on the osgi-dev mailing list or open an OSGi specification bug at https://www.osgi.org/bugzilla/enter_bug.cgi.

I would not expect you to get Package objects for any packages for which a class is not defined. In most cases I don't think the VM class loaders do that (boot, extension, application etc.).

Tom



Inactive hide details for "Jan Stette" ---06/02/2008 12:41:34 PM---2008/6/2 BJ Hargrave <hargrave@xxxxxxxxxx>: >"Jan Stette" ---06/02/2008 12:41:34 PM---2008/6/2 BJ Hargrave <hargrave@xxxxxxxxxx>: >


From:

"Jan Stette" <jan.stette@xxxxxxxxx>

To:

"Equinox development mailing list" <equinox-dev@xxxxxxxxxxx>

Date:

06/02/2008 12:41 PM

Subject:

Re: [equinox-dev] Question regarding class loader and getPackages()




2008/6/2 BJ Hargrave <hargrave@xxxxxxxxxx>:


    > 1.  The call is not overridden in the Equinox classloader, so the
    > default implementation in java.lang.ClassLoader is used.  Hence,
    > only the bundle's own packages, and the system packages are returned.


    I don't think imported packages should be listed since they are imported from other bundles.

Does it matter which bundles the packages come from? From the client of the classloader, I would have thought this should be transparent, i.e. that it returns all packages that are visible through this classloader. From the javadoc for java.lang.ClassLoader.getPackages(): "Returns all of the Packages defined by this class loader and its ancestors". In an OSGi environment, wouldn't it be natural to include classloaders from bundles depended on as well?

Anyway, is this a question better suited for osgi-dev instead of this list?

Regards,
Jan

_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev


GIF image

GIF image


Back to the top