Hi,
I am stuck on this seemingly trivial problem
since some time.
Here's what i have
Code:
- Red Hat Enterprise Linux Advanced Server 4 Upgrade 3
- Matlab Component runtime v 75 (this is the runtime for executing the ctf and jar files generated by MATLAB. I am using MATLAB builder for java. There is no issue with this software by the looks of it.I feel it has to do with the path settings)
Now for testing, there is a java program "Hello" that basically invokes a method (written in MATLAB and present in the jar file hellomatlab.jar).
I tried to execute this using the following script
Code:
export CLASSPATH=/root/v75/toolbox/javabuilder/jar/javabuilder.jar:/root/Hello/hellomatlab.jar:.
export LD_LIBRARY_PATH=/root/v75/sys/os/glnxa64:/root/v75/bin/glnxa64:/root/v75/extern/lib/glnxa64:/root/v75/sys/java/jre/glnxa64/jre1.5.0/lib/amd64/native_threads:/root/v75/sys/java/jre/glnxa64/jre1.5.0/lib/amd64/server:/root/v75/sys/java/jre/glnxa64/jre1.5.0/lib/amd64
export XAPPLRESDIR=/root/v75/X11/app-defaults
/usr/java/jre1.6.0/bin/java -Djava.library.path=$LD_LIBRARY_PATH Hello
The MCR is installed at /root/v75. As per the documentation in MCR, we need to update an environment variable called LD_LIBRARY_PATH to include the required .so
As you can see, I have passed the LD_LIBRARY_PATH when invoking java.exe
Upon execution I am facing the following error
Code:
Exception in thread "main" java.lang.UnsatisfiedLinkError: /root/v75/bin/glnxa64/libnativemcl75.so: /root/v75/bin/glnxa64/libnativemcl75.so: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at com.mathworks.toolbox.javabuilder.MWMCR.<clinit>(MWMCR.java:18)
at hellomatlab.hellomatlabclass.<init>(hellomatlabclass.java:48)
at Hello.main(Hello.java:21)
What the output means is that during execution, when an attempt is made to invoke the function in MATLAB (located in hellomatlab.jar), an attempt is being made to access libnativemcl75.so. This file is present at the required location (with permission set to 777). However i am still running into issues
Any inputs on this one?
Thanks for you help
Sirish