Load 3rd party libs using sling bootdelegation.

Question

How can we load a 3rd party library that is not an OSGi? bundle.

Answer

You can use sling bootdelegation in sling.properties.

  • Add the jar to the shared classpath of your application server, for example crx-quickstart/server/lib/container under CQSE.
  • Add sling.system.packages.simple or sling.system.packages.class. property to load the 3rd party packages. This will add 3rd party packages to the export list of the system bundle.

Example

Add the com.some.package package to the org.osgi.framework.system.packages property:

sling.system.packages.simple = com.some.package 

Checks whether the com.some.other.Main class is known. If so, the com.some.other package is added to the org.osgi.framework.system.packages property.

sling.system.packages.class.com.some.other.Main = com.some.other 

Please refer to Sling documentation for more information.

References

http://sling.apache.org/site/configuration.html

 Adobe

Saņemiet palīdzību ātrāk un vienkāršāk

Jauns lietotājs?

Adobe MAX 2024

Adobe MAX
Radošuma konference

14.–16. oktobris Maiami pludmalē un tiešsaistē

Adobe MAX

Radošuma konference

14.–16. oktobris Maiami pludmalē un tiešsaistē

Adobe MAX 2024

Adobe MAX
Radošuma konference

14.–16. oktobris Maiami pludmalē un tiešsaistē

Adobe MAX

Radošuma konference

14.–16. oktobris Maiami pludmalē un tiešsaistē