Results 1 to 1 of 1
- 12-16-2010, 10:14 AM #1Member
- Join Date
- Dec 2010
- Rep Power
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.
- By nmarathe in forum EclipseReplies: 4Last Post: 03-11-2009, 01:37 PM
- By SatishP in forum EclipseReplies: 1Last Post: 09-29-2008, 09:45 PM
- By eva in forum EclipseReplies: 1Last Post: 01-21-2008, 10:56 PM
- By JavaForums in forum EclipseReplies: 0Last Post: 05-18-2007, 12:28 PM
- By sin in forum EclipseReplies: 1Last Post: 05-10-2007, 07:43 PM