English 中文(简体)
What does Tool/Bundle-Name/Export-Package etc. mean in a jar manifest
原标题:

I m looking at the manifest.mf for some apache libraries. While I can guess what Export-Package means, I can t find any documentation for these attributes ? Could anyone point me in the right direction. Here.s an example:

Manifest-Version: 1.0
Created-By: 1.6.0_07 (Sun Microsystems Inc.)
Built-By: pemben
Implementation-Title: Commons BeanUtils
Implementation-Vendor: The Apache Software Foundation
Implementation-Vendor-Id: org.apache
Implementation-Version: 1.8.2
Specification-Title: Commons BeanUtils
Specification-Vendor: The Apache Software Foundation
Specification-Version: 1.8.2
Export-Package: org.apache.commons.beanutils.locale.converters;
Private-Package: org.apache.commons.collections;version="1.8.2"
Ignore-Package: org.apache.commons.collections
Tool: Bnd-0.0.238
Bundle-Name: Commons BeanUtils
Bundle-Vendor: The Apache Software Foundation
Bundle-Version: 1.8.2
Bnd-LastModified: 1257775355133
Bundle-ManifestVersion: 2
Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
Bundle-Description: BeanUtils provides an easy-to-use but flexible wra
 pper around reflection and introspection.
Import-Package: org.apache.commons.beanutils;version="1.8.2"
Bundle-SymbolicName: org.apache.commons.beanutils
Bundle-DocURL: http://commons.apache.org/beanutils/
最佳回答

The Bundle attributes define info wrt. OSGi bundles. An OSGi bundle is simply a .jar file that also defines (via the attributes) what it exports, and what its dependencies are (including versions). Note that the .jar file can be used as a standard .jar file - the bundle information is only used in an OSGi container.

This JavaWorld article is a good introduction.

问题回答

This is OSGi. Eclipse uses it, also nutch.

From the Export-Package filed, I d guess you are looking at an OSGi Bundle.

Check the Wikipedia article or the OSGi homepage for details.

If you want really good explanations for the meanings of OSGi Manifest entries, I strongly suggest you read the specification. It is not very long and will explain in good detail all you want to know. Also, keep in mind that the Manifest.mf file is not specific to OSGi; other Java libraries also make use of it. As such, not all the entries you see above are defined by the OSGi specification, such as Tool , and Bnd-LastModified , which were added by the Bnd utility.





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签