code: private void loadNativeLibraries(File root)
     {
        if (root != null && root.exists())
        {
           List<String> libs = new ArrayList<String>();
  
           if (root.isDirectory())
           {
              if (root.listFiles() != null)
              {
                 for (File f : root.listFiles())
                 {
                    if (f.isFile())
                    {
                       String fileName = f.getName().toLowerCase(Locale.US);
                       if (fileName.endsWith(".a") || fileName.endsWith(".so") || fileName.endsWith(".dll"))
                       {
                          libs.add(f.getAbsolutePath());
                       }
                    }
                 }
              }
              else
              {
                 log.debugf("Root is a directory, but there were an I/O error: %s", root.getAbsolutePath());
              }
           }
  
           if (libs.size() > 0)
           {
              for (String lib : libs)
              {
                 try
                 {
                    SecurityActions.load(lib);
                    log.debugf("Loaded library: %s", lib);
                 }
                 catch (Throwable t)
                 {
                    log.debugf("Unable to load library: %s", lib);
                 }
              }
           }
           else
           {
              log.debugf("No native libraries for %s", root.getAbsolutePath());
           }
        }
     }
docs: Load native libraries
  @param root The deployment root