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 ./run.sh
Initializing Engine...
Exception in thread "main" java.lang.UnsatisfiedLinkError: /opt/ABBYY/FREngine12/Bin/libFREngine.Jni.so: libPortLayer.so: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at com.abbyy.FREngine.Engine.loadFREngineJNIDllFromFolder(Engine.java:237)
at com.abbyy.FREngine.Engine.loadFREngineJNIDll(Engine.java:187)
at com.abbyy.FREngine.Engine.GetEngineObject(Engine.java:28)
at Hello.loadEngine(Hello.java:41)
at Hello.Run(Hello.java:29)
at Hello.main(Hello.java:21)
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-1.8.0.161-2.b14.el7.x86_64"
export PATH=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-2.b14.el7.x86_64:$PATH
sudo ./build.sh
sudo ./run.sh
What's strange is that there is indeed a libPortLayer.so file in the same directory as libFREngine.Jni.so. Both files are located here:
/opt/ABBYY/FREngine12/Bin
Any ideas on what's wrong?