Can't load library error (jni.dll)

  • 3.5K Views
  • Last Post 16 April 2015
oliverkan posted this 09 January 2015

hi, i am trying to develope java apllication using FRE on windows 8.1 platform. When i try to call Engine.load method i got this error:

java.lang.UnsatisfiedLinkError: Can't load library: C:\ProgramData\ABBYY\SDK\11\FineReader Engine\win\x86\FREngine.Jni.dll.
java.lang.UnsatisfiedLinkError: Can't load library: C:\ProgramData\ABBYY\SDK\11\FineReader Engine\win\x86\FREngine.Jni.dll
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1705)
    at java.lang.Runtime.load0(Runtime.java:770)
    at java.lang.System.load(System.java:1003)
    at com.abbyy.FREngine.Engine.unpackJarAndLoadFREngineJNIDll(Engine.java:164)
    at com.abbyy.FREngine.Engine.loadFREngineJNIDll(Engine.java:118)

i have .dll files in C:\ProgramData\ABBYY\SDK\11\FineReader Engine\Java\com.abbyy.FREngine\win\x86 folder but there is no C:\ProgramData\ABBYY\SDK\11\FineReader Engine\win\x86\ folder. how can I solve this problem?

Thanks.

Order By: Standard | Newest | Votes
Anastasiya Medvedeva posted this 22 January 2015

Hi, can you please send description of your issue and your serial number to SDK_Support@abbyy.com?

vshah posted this 16 April 2015

Hi oliverkan, Did you get a resolution for this question (after talking to ABBYY support)? I am running into similar sort of problem - so wanted to check with you. Thanks!

Anna Falevskaya posted this 16 April 2015

Hello everyone!

The com.abbyy.FREngine.jar file is a self-unpacking archive which is unpacked on your machine the first time you use FineReader Engine Java API. The default folder where the contents are unpacked is Inc\Java.

You can check the default folder by calling the Engine.GetJNIDllFolder method in your project before Engine initialization. Probably, in your case it was changed to "C:\ProgramData\ABBYY\SDK\11\FineReader Engine".

To resolve the situation, please, set the correct path to the FREngine.Jni.dll. It can be done by using the Engine.SetJNIDllFolder method. So please add the following line before Engine initialization in your project:

Engine.SetJNIDllFolder("C:\\ProgramData\\ABBYY\\SDK\\11\\FineReader Engine\\Java\\com.abbyy.FREngine");

maol posted this 17 April 2015

I also had this problem. I resolved it by creating manually the directory C:\ProgramData\ABBYY\SDK\11\FineReader Engine\win\x86 and copying the FREngine.Jni.dll into it.

maol posted this 06 November 2015

For the moment, with all installs I have done, it never unpacks automatically. This is quite annoying. Why can't it already be in the required folder ?

maol posted this 20 November 2015

Note: Self-extraction of the dll does not work if the jar file has been renamed.

Oksana Serdyuk posted this 23 November 2015

Hi maol,

This issue is already fixed and the fix is already available beginning from FineReader Engine 11 R6, build number 11.1.14.63. Now the FREngine.Jni.dll should be correctly extracted regardless of the com.abbyy.FREngine.jar name.

Could you please check the build number of your FineReader Engine distribution? If you use any of the earlier releases of the program, then you can contact your sales manager to get the link for the current release. Please do not forget to specify your serial number of your FineReader Engine package in your e-mail.

Close