Where does eclipse look for binary libraries in plugins?

I have an eclipse plugin (developed by a third party, without source code) that uses a binary library to do some of its work. The library is open source. The distributed plugin only includes the binary for Windows, but I can easily compile it for other platforms. I cannot figure out where to place the library so that it is raised. I am currently working on OS X, but Linux is also a problem.

The Windows library is placed in eclipse / plugins / plugin_name / os / win32 / x86. I tried using os / macosx / x86_64 (which corresponds to the constants in org.eclipse.osgi.service.environments) and many other options, but nothing works, and I can not find any documentation on how eclipse sets the library path.

Where should I put the libraries in the subdirectory of the plugin so that eclipse downloads them for the appropriate platform?

+3
source share
1 answer

Binary libraries (for example, .dll) can be integrated inside the JAR plugin itself. In this case, it is probably located in the file / os / win 32 / x86 / thelib.dll.

META-INF/MANIFEST.MF ( jar), "Bundle-NativeCode". :

Bundle-NativeCode: /os/win32/x86;osname=win32;processor=x86

OS X :

Bundle-NativeCode: /os/win32/x86;osname=win32;processor=x86, /os/osx/x86; osname=macosx;processor=x86

OS X libs , rezip , !

+1

All Articles