【问题标题】:Exception in thread "main" java.lang.UnsatisfiedLinkError: The specified module could not load线程“main”中的异常 java.lang.UnsatisfiedLinkError:无法加载指定的模块
【发布时间】:2017-03-05 12:35:27
【问题描述】:

使用 tessaract ocr 时出现以下异常。这个异常背后的原因是什么?

Exception in thread "main" java.lang.UnsatisfiedLinkError: The specified module could not be found.

    at com.sun.jna.Native.open(Native Method)
    at com.sun.jna.Native.open(Native.java:1759)
    at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:260)
    at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:398)
    at com.sun.jna.Library$Handler.<init>(Library.java:147)
    at com.sun.jna.Native.loadLibrary(Native.java:412)
    at com.sun.jna.Native.loadLibrary(Native.java:391)
    at net.sourceforge.tess4j.util.LoadLibs.getTessAPIInstance(Unknown Source)
    at net.sourceforge.tess4j.TessAPI.<clinit>(Unknown Source)
    at net.sourceforge.tess4j.Tesseract.init(Unknown Source)
    at net.sourceforge.tess4j.Tesseract.doOCR(Unknown Source)
    at net.sourceforge.tess4j.Tesseract.doOCR(Unknown Source)
    at net.sourceforge.tess4j.Tesseract.doOCR(Unknown Source)
    at tess4j.example.Ocreg.main(Ocreg.java:31)
Java Result: 1
BUILD SUCCESSFUL (total time: 3 seconds)

【问题讨论】:

    标签: java tesseract


    【解决方案1】:

    Java 代码希望在运行时使用本机库(这就是 JNI 的用途)。

    您必须确保该库的正确版本在您正在查找的位置可用。请注意,这可能有点棘手,文档应严格遵守。

    【讨论】:

      猜你喜欢
      • 2013-01-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-02-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多