Queries on Jar files | Community
Skip to main content
October 16, 2015
Solved

Queries on Jar files

  • October 16, 2015
  • 2 replies
  • 776 views

Hi All,

What is the difference between OSGI Jar file and Normal Jar file?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by JustinEd3

Hi,

Just to be clear, every JAR file has a MANIFEST.MF file in it. OSGi defines additional headers which go in the manifest, but the core file and format (and placement within the JAR file) is defined by the Java core specification.

Regards,

Justin

2 replies

Lokesh_Shivalingaiah
Level 10
October 16, 2015

OSGi jar which are known as bundle requires OSGi metadata in its manifest so that an OSGi framework can manage the visibility of classes between bundles. A JAR without this metadata would only contain invisible classes, could not see any classes from other bundles, nor could it get started in any way. The Import-Package manifest header tells what packages should be made visible to the bundle, and the Export-Package defines the packages in the bundle that should be made visible to others.

Normal jar wouldnt have this metadata or a manifest file

JustinEd3Adobe EmployeeAccepted solution
Adobe Employee
October 16, 2015

Hi,

Just to be clear, every JAR file has a MANIFEST.MF file in it. OSGi defines additional headers which go in the manifest, but the core file and format (and placement within the JAR file) is defined by the Java core specification.

Regards,

Justin