Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
OSGi
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
OSGi
(section)
Add topic