Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
OSGi
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Bundles== [[Image:osgi-system-layering.svg|thumb|upright=1.35|Classification: OSGi]] A bundle is a group of Java classes and additional resources equipped with a detailed manifest <code>[[MANIFEST.MF]]</code> file on all its contents, as well as additional services needed to give the included group of Java classes more sophisticated behaviors, to the extent of deeming the entire aggregate a component. Below is an example of a typical <code>[[MANIFEST.MF]]</code> file with OSGi Headers: <syntaxhighlight lang="properties" line> Bundle-Name: Hello World Bundle-SymbolicName: org.wikipedia.helloworld Bundle-Description: A Hello World bundle Bundle-ManifestVersion: 2 Bundle-Version: 1.0.0 Bundle-Activator: org.wikipedia.Activator Export-Package: org.wikipedia.helloworld;version="1.0.0" Import-Package: org.osgi.framework;version="1.3.0" </syntaxhighlight> The meaning of the contents in the example is as follows:<ref>[http://blog.springsource.com/2008/02/18/creating-osgi-bundles/ Creating OSGi bundles] by Costin Leau</ref> # '''Bundle-Name:''' Defines a human-readable name for this bundle, Simply assigns a short name to the bundle. # '''Bundle-SymbolicName:''' The only required header, this entry specifies a unique identifier for a bundle, based on the [[Reverse domain name notation|reverse domain name convention]] (used also by the [[java packages]]). # '''Bundle-Description:''' A description of the bundle's functionality. # '''Bundle-ManifestVersion:''' Indicates the OSGi specification to use for reading this bundle. # '''Bundle-Version:''' Designates a version number to the bundle. # '''Bundle-Activator:''' Indicates the class name to be invoked once a bundle is activated. # '''Export-Package:''' Expresses which Java packages contained in a bundle will be made available to the outside world. # '''Import-Package:''' Indicates which Java packages will be required from the outside world to fulfill the dependencies needed in a bundle.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)