private void unloadNatives(String nativePath) {
     if (!natives_loaded)
       return;
     try
    {
       Field field = ClassLoader.class.getDeclaredField("loadedLibraryNames");
       field.setAccessible(true);
      @SuppressWarnings("rawtypes")
                Vector libs = (Vector)field.get(getClass().getClassLoader());
 
       String path = new File(nativePath).getCanonicalPath();
 
       for (int i = 0; i < libs.size(); i++) {
        String s = (String)libs.get(i);
 
         if (s.startsWith(path)) {
           libs.remove(i);
          i--;
        }
       }
     } catch (Exception e) {
     e.printStackTrace();
     }
   }