My aim is to call Matlab from a java plugin I'm writing. I was already able to do this some time ago, but since a recent re-install, the very same application just stopped working.
The java application always returns 'Can't open engine' as the native function engOpen(char*) returns 0.
I now tried several approaches: - calling engOpen("\0") from a simple enginedemo.c program - calling engOpen(null) from java, using JNA mapped to libeng.so - calling engine.engOpen() from java, using JMatLink (which uses JNI).
Every time getting an engine pointer = 0 I didn't get any errors compiling enginetest.c or compiling libJMatLink.so.
LD_LIBRARY_PATH points to $(MATLAB)/bin/glnx86 So I'm not getting any linking errors, not when compiling, not when running... but engOpen() just fails to open a matlab engine. It simply returns 0, apparently without any further errors.
What could I be missing here? Matlab itself works fine when I enter 'matlab' on the command line.
My system: Fedora 9 gcc 4.3.0 Sun Java 1.6.0_10 Matlab 7.6.0 (R2008a)
Thanks for every hint about what could be going wrong here... I've already lost several days on this problem.