Skip to end of metadata
Go to start of metadata

When using the default file system-backed module loader, each module defined in the module repository has an additional resource root automatically added to it solely for the purposes of supporting native libraries in a module. This resource root recognizes a special directory in each module root named "lib".

The module class loader will search for native libraries by encoding the current detected platform into a directory name, appending it to the path of the "lib" directory, and testing the resultant directory for a matching native library file. For example, imagine a module named "org.foobar.gizmo" which contains a native library which runs on Linux for Intel 32- and 64-bit processors. It would have a module directory structure similar to this:

org/
└─ foobar/
   └─ gizmo/
      └─ main/
         ├─ module.xml
         ├─ gizmo-1.0.jar
         └─ lib/
            ├─ linux-i686/
            │  └─ libgizmo.so
            └─ linux-x86_64/
               └─ libgizmo.so

In this case, the appropriate libgizmo.so will automatically be located. On platforms without a corresponding library, no library will be loaded.

The platform string is in the form "<osname>-<cpuname>". The following values may be used for the OS name:

Name
linux
macosx
win
os2
solaris
mpeix
hpux
aix
os390
freebsd
openbsd
netbsd
irix
digitalunix
osf1
openvms
unknown

The following values are recognized for the CPU name:

Name
sparcv9
sparc
x86_64
i686
ppc64
ppc
arm
parisc64
parisc
alpha
mips
unknown
Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.