I have read that. I have created a plugin to wrap the native libraries. I am then calling SetTurboActivateFolder(..) to set the path to plugin folder.
This works fine when it is running as an Eclipse Application.
However when I build it as an RCP product, the native libraries are bundled into the plugin jar. When jna tries to load them the path is actually a jar file;-
...a_file_path..1706121238.jar!/mac/librlm1222.dylib
and jna throws an error.
Caused by: java.lang.IllegalArgumentException: name too long at java.lang.System.mapLibraryName(Native Method) at com.sun.jna.NativeLibrary.mapSharedLibraryName(NativeLibrary.java:730) at com.sun.jna.NativeLibrary.findLibraryPath(NativeLibrary.java:692) at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:180) at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:427) at com.sun.jna.Library$Handler.<init>(Library.java:179) at com.sun.jna.Native.loadLibrary(Native.java:569) at com.sun.jna.Native.loadLibrary(Native.java:544)
The standard way of loading native libraries with OSGi is to use jni and Bundle-NativeCode in the manifest.
Any ideas?