java.lang.UnsatisfiedLinkError when trying to run Linux FineReader Engine Hello World sample Answered

Hello --

I am getting the following error when I try to run the Linux Java Hello World sample on CentOS 7:

[admin@localhost Hello]$ sudo ./
Initializing Engine...
Exception in thread "main" java.lang.UnsatisfiedLinkError: /opt/ABBYY/FREngine12/Bin/ cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(
at java.lang.ClassLoader.loadLibrary(
at java.lang.Runtime.load0(
at java.lang.System.load(
at com.abbyy.FREngine.Engine.loadFREngineJNIDllFromFolder(
at com.abbyy.FREngine.Engine.loadFREngineJNIDll(
at com.abbyy.FREngine.Engine.GetEngineObject(
at Hello.loadEngine(
at Hello.Run(
at Hello.main(

These are the steps I've taken to build/run the application:

cd /opt/ABBYY/FREngine12/Samples/Java/Hello
export LD_LIBRARY_PATH="/opt/ABBYY/FREngine12/Bin"
export JDK="/usr/lib/jvm/java-1.8.0-openjdk-"
export PATH=/usr/lib/jvm/java-1.8.0-openjdk-$PATH

sudo ./
sudo ./

What's strange is that there is indeed a file in the same directory as Both files are located here:


Any ideas on what's wrong?




  • Avatar
    Koen de Leijer


    My idea is that you are running the shell-scripts as root (with sudo),
    but are not exporting the environment-variables as root.

    Best regards
    Koen de Leijer

  • Avatar
    Jeff Boller

    That was it -- thank you so much!

  • Avatar

    I was also facing the same problem and I can't find its solution. I have also posted this question in another forum but still can't get a reply from there. Then I asked my friend to help me out with this problem and he shared your post with me. I am also running the shell-script as root.  But now I know my problem solution. Thank you Koen de Leijer.


Please sign in to leave a comment.