Loading more than one library per native call
843829Sep 17 2010 — edited Sep 20 2010
I never really used forums before, but now I am really stuck... Ok I have a java application that needs to load several c++ libraries.
The C++ libraries are supposed to do the following
libA.so prints Hello A.
libB.so prints Hello B.
abstract class Master
public abstract void testeMyFunction(String name);
class A extends Master
public native void testeMyFunction(String name);
public class Main
public static void main(String args) throws Exception
A a =new A("/home/filipe/workspace/TESTES/myTeste/Debug/libA.so");
A b = new A("/home/filipe/workspace/TESTES/myTeste2/Debug/libB.so");
The expected output should be:
However the result is Hello A Hello A :(
I believe its because it is binding the native call to the first System.load (in this case libA.so) and therefore its not loading the second library properly... Is there anyway you guys can recommend to have the desired output?
Thanks a million,
Edited by: TonyCarreira on Sep 17, 2010 8:24 AM