ITeye博客

osgi 中require-bundle import-package 的差别

floydd · 2008-05-07 16:19 · Markdown



To be clear, require-bundle and import-package are not equivalent, but 
they certainly overlap. A simple way of looking at require-bundle is 
that it is a shorthand way of importing every package that is exported 
by another bundle, but it a slightly different than this in reality.

Import-package terminates when a class from the package is not found 
(i.e., packages are assumed to be self-contained), while require-bundle 
does NOT terminate when a class from a package is not found, it 
continues searching other required bundles as well as the local bundle 
itself (i.e., packages are assumed to be split).

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。