• 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-ClassPath ::= entry ( ',' entry )*

    Prev Next
    Header
    The Bundle-ClassPath header defines a comma-separated list of JAR file path names or directories (inside the bundle) containing classes and resources. The full stop ('.' \u002E) specifies the root di- rectory of the bundle's JAR. The full stop is also the default

    • Example: Bundle-ClassPath: /lib/libnewgen.so, .

    • Pattern: .*



    Bundle-ClassPath

    The Bundle-ClassPath header defines the internal class path for the bundle. It is a comma-separated list of JAR file paths or directories (inside the bundle) that contain classes and resources. The special entry . refers to the root of the bundle JAR and is the default if the header is not specified.

    All files or directories listed in the Bundle-ClassPath must be present in the bundle. You can use the Include-Resource instruction to include additional JARs or directories. In most cases, it is recommended to avoid using Bundle-ClassPath unless necessary, as it can complicate class loading. Instead, use the @ option in Include-Resource to unroll JARs into the main bundle.

    Example:

    Bundle-ClassPath: ., lib/extra.jar
    

    This header is important for advanced scenarios where you need to include additional classpath entries inside your bundle.


    TODO Needs review - AI Generated content

Prev Next
Search
    • Home