how can one eclipse plugin access the native lib loaded by another plugin?
In my eclipse plugin, can I access the native lib(*.frameworks) loaded by another one(third party plugin) through JNI?
The reason why I have to touch it, is the third party plugin does not expose some methods of the framework that I want to use. And the same framework can not be reloaded in JVM on Mac OS.
One way I tried is copying the framework into my plugin and load it and access the method in it. But it looks like the third patty plugin has loaded the framework and when I loaded the framework and access its method in my libgoodluck.jnilib, it always give me the error "Invalid memory access the location : 0x0". The most strange thing is I can successfully get address of the method of the framework in my libgoodluck.jnilib, but once I called it, the error happens. The following is the steps I did:
1. copy the framework into my plugin
2. write a stub lib libgoodluck.jnilib to load the framework as bundle in my xcode project, and access the function from the bundle based on function name
3. In my java plugin, to load the stub by using System.loadLibrary("goodluck");
Another way in my head is create an another process to load the framework and my plugin to call it through inter-process communication.
Any guess for this, thank you all guys for the help anyway.