What does the private-package manifest header do?

前端 未结 3 1930
忘了有多久
忘了有多久 2021-02-19 15:57

I am familiar with Import-Package and Export-Package, but this is a new one for me. What does it do?

3条回答
  •  耶瑟儿~
    2021-02-19 16:50

    In fact Private-Package does more than just not exporting a package. If the packages specified in Private-Package are not defined inside you own project and are not imported in Import-Package then they are automatically inlined into your jar. So this is an easy way to include non OSGi dependencies. Be careful though that inlining can easily lead to classpath problems.

提交回复
热议问题