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:
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:
The following values are recognized for the CPU name: