Child pages
  • Packaging Native Libraries
Skip to end of metadata
Go to start of metadata

Sometimes there is a need to include some native libraries in contribution. Fabric3 offers easy and efficient way how to do it. All it needs to be done is include them in sca-contribution.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<contribution xmlns="" xmlns:f3="">

    <f3:library path="META-INF/native/sigar-x86-winnt.lib">
    	<os name="Windows" processor="x86"/>
	<f3:library path="META-INF/native/sigar-x86-winnt.dll">
    	<os name="Windows" processor="x86"/>
	<f3:library path="META-INF/native/sigar-amd64-winnt.dll">
    	<os name="Windows" processor="x86-64"/>
	<f3:library path="META-INF/native/">
    	<os name="Linux" processor="x86-64"/>
	<f3:library path="META-INF/native/libsigar-universal64-macosx.dylib">
    	<os name="Mac OS X" processor="x86-64"/>


Libraries needs to be in respective directories (e.g. META-INF/native). When runtime is booted, fabric3 copy the respective libraries (depending on os, architecture, ...) to tmp/native dir in runtime directory and set the JVM library path to include those libraries.

Possible processor attribute values:

  • x86_64
  • x86
  • 68k
  • arm
  • alpha
  • ignite
  • mips
  • parisc
  • powerpc
  • sparc

Possible name attribute values:

  • Windows
  • Linux
  • Mac OS
  • Mac OS X
  • AIX
  • Digital Unix
  • FreeBSD
  • HP UX
  • Irix
  • MPE/iX
  • Netware 4.11
  • OS/2
  • Solaris
  • Windows 2000
  • Windows 95
  • Windows 98
  • Windows NT
  • Windows Vista
  • Windows XP
  • Windows 7
  • Windows 8
Write a comment…