• 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-NativeCode ::= nativecode ( ',' nativecode )* ( ',' optional ) ?

    Prev Next
    Header
    The Bundle-NativeCode header contains a specification of native code libraries contained in this bundle.

    • Example: Bundle-NativeCode: /lib/http.DLL; osname = QNX; osversion = 3.1

    • Pattern: .*

    Options

    • osname The name of the operating system.
      • Example: osname=MacOS

      • Values: AIX,DigitalUnix,Embos,Epoc32,FreeBSD,HPUX,IRIX,Linux,MacOS,NetBSD,Netware,OpenBSD,OS2,QNX,Solaris,SunOS,VxWorks,Windows95,Win32,Windows98,WindowsNT,WindowsCE,Windows2000,Windows2003,WindowsXP,WindowsVista

      • Pattern: .*

    • osversion Operating System Version.
      • Example: osversion=3.1

      • Pattern: .*

    • language Language ISO 639 code.
      • Example: language=nl

      • Pattern: \p{Upper}{2}

    • processor Processor name.
      • Example: processor=x86

      • Values: 68k,ARM_LE,arm_le,arm_be,Alpha,ia64n,ia64w,Ignite,Mips,PArisc,PowerPC,Sh4,Sparc,Sparcv9,S390,S390x,V850E,x86,i486,x86-64

      • Pattern: .*

    • selection-filter The value of this attribute must be a filter expression that indicates if the native code clause should be selected or not.
      • Example: selection-filter="(com.acme.windowing=win32)"

      • Pattern: .*



    Bundle-NativeCode

    The Bundle-NativeCode header specifies native code libraries that are included in the bundle and may be loaded by the OSGi framework. This header lists one or more native code clauses, each describing the path to a native library and optional attributes such as operating system, processor, language, or version constraints.

    Example:

    Bundle-NativeCode: lib/linux-x86/libfoo.so;osname=Linux;processor=x86, lib/win32-x86/foo.dll;osname=Windows;processor=x86
    

    A wildcard (*) can be used as the last entry to indicate that the bundle can run without native code if no match is found. If a required native library is missing or not found in the JAR, bnd will issue an error.

    This header is used for bundles that need to provide platform-specific native libraries alongside Java code.


    TODO Needs review - AI Generated content

Prev Next
Search
    • Home