I’m currently doing some development on a large RCP application. One recent task required using a Windows DLL to open an email message through MAPI, which is made pretty easy with OSGi. But I encountered a few issues that I’m sure will bite other people.
now provides some support for resolving and loading shared libraries/DLLs in Java applications. A bundle declaratively specifies its DLLs and associated platform requirements in their bundle manifest using the Bundle-NativeCode header. This header value is then used when loading a DLL through System.loadLibrary().
TheBundle-NativeCode header specifies a number of comma-delimited clauses. For example:
Bundle-NativeCode: lib/win32/x86/http.dll; lib/win/zlib.dll; processor=x86; osname=win32, lib/macosx/libhttp.dylib; lib/macosx/libzlib.jnilib; osname=macosx; processor=x86; processor=x86_64, *
A clause specifies one or more DLLs. A clause is matched to the current platform using a set of parameters (e.g., processor and osname, but also osversion, language, or a selection-filter). Parameters of…
View original post 408 słów więcej