• Intro Headers Instructions Macros Commands
Fork me on GitHub
    • Getting Started
      • Introduction
      • How to install bnd
      • Guided Tour Workspace & Projects
      • bnd / bndlib Features and JAR Wrapping Techniques
      • FAQ - Frequently Asked Questions
    • Concepts and Practices
      • Concepts
      • Background
      • Best practices
    • Build and Development
      • Build
      • Generating JARs
      • Versioning
      • Baselining
      • Service Components
      • Metatype
      • Contracts
      • Bundle Annotations
      • Accessor Properties
      • SPI Annotations
    • Dependency and Launching
      • Resolving Dependencies
      • Launching
      • Startlevels
    • Testing
      • Testing
      • Testing with Launchpad
    • Packaging and Distribution
      • Packaging Applications
      • JPMS Libraries
      • Wrapping Libraries to OSGi Bundles
    • Documentation and Tools
      • Generating Documentation
      • bnd CLI Commands
      • For Developers
      • Templates for Workspaces
      • Tips for Windows users
      • Tools bound to bnd
    • Reference Material
      • Reference
      • Headers
      • Instruction Reference
      • Instruction Index
      • Macro Reference
      • Macro Index
      • Plugins
      • External Plugins
    • Configuration and Troubleshooting
      • Settings
      • Errors
      • Warnings
  • Bundle-ActivationPolicy ::= policy ( ';' directive )*

    Prev Next
    Header
    The Bundle-ActivationPolicy specifies how the framework should activate the bundle once started.

    • Example: Bundle-ActivationPolicy: lazy

    • Values: lazy

    • Pattern: lazy



    Bundle-ActivationPolicy

    The Bundle-ActivationPolicy header specifies how the OSGi framework should activate the bundle once it has been started. The most common value for this header is lazy, which indicates that the bundle should be started in lazy activation mode. In this mode, the bundle’s activator is not called until the first class from the bundle is loaded.

    This header can also include additional directives, such as include and exclude, to further control activation behavior. The header is typically used as follows:

    Bundle-ActivationPolicy: lazy
    

    For more details, see the OSGi Specification.

    If the header is set incorrectly (for example, with no argument or with too many arguments), bnd will issue a warning. The value should be set to lazy for standard lazy activation.


    TODO Needs review - AI Generated content

Prev Next
Search
    • Home