Here are the symptoms of a problem I'm facing. Has anyone faced such
an issue and managed to solve it?
To me, all the symptoms seem to point to the Sun Java interpreter
being the culprit. I basically wrote some code to create a shared
library(say X.so) that has a single function that accesses more
libraries to get some stuff done. I then wrote a Java program to
access X.so using JNI. Here are the symptoms,
i) when I run a C++ program that opens X.so, and executes the function
exposed by it, it works fine. The entire function runs correctly, and
gives the right output.
ii) when I compile and link the source code of X.so statically so that
it creates an executable instead of a ".so", and run the executable,
again the executable runs fine
iii) but when I use the Java program to load X.so, and execute the
exposed function, it loads the library successfully, starts executing
the code in it too (displays some output), but the function returns
with a failure when it attempts to create an instance of an object
from another shared library.
iv) what strengthened my view even further today is that when the SAME
Java class is executed using the 'gij' interpreter isntead of Sun's
'java' interpreter, it runs perfectly, loading the shared library X.so
and executing everything nicely...
Which probably means that there is an incorrect call or incorrectly
resolved symbol somewhere in the 'java' interpreter, which is causing
the problem...
Can any one help?
Tahir.