Class LoadLibs

java.lang.Object
net.sourceforge.lept4j.util.LoadLibs

public class LoadLibs extends Object
Loads native libraries from JAR or project folder.
  • Field Details

  • Constructor Details

    • LoadLibs

      public LoadLibs()
  • Method Details

    • getLeptonicaInstance

      public static Leptonica getLeptonicaInstance()
      Loads Leptonica library via JNA.
      Returns:
      Leptonica instance being loaded using Native.loadLibrary().
    • getLeptonicaLibName

      public static String getLeptonicaLibName()
      Gets native library name.
      Returns:
      the name of the Leptonica library to be loaded using the Native.register().
    • extractNativeResources

      public static File extractNativeResources(String dirname)
      Extracts Leptonica resources to temp folder.
      Parameters:
      dirname - resource location
      Returns:
      target location
    • copyJarResourceToDirectory

      static void copyJarResourceToDirectory(JarURLConnection jarConnection, File destDir)
      Copies resources from the jar file of the current thread and extract it to the destination directory.
      Parameters:
      jarConnection -
      destDir -