OSGI – handling 3rd party JARs required by a bundle

You can include a third party jar inside your bundle by adding the third party jar to the root directory of the bundle jar file and then adding a bundle classpath header to the bundle’s manifest, e.g.:

Bundle-ClassPath: .,my3rdparty.jar

If you want to place third party jar to subdirectory, specify the path without using heading ./, e.g

Bundle-ClassPath: .,lib/my3rdparty.jar # (not ./lib/my3rdparty.jar)

Leave a Comment