OSGI framework hangs when loading native library

无人久伴 提交于 2019-12-06 15:30:53

There are two possible issues with the situation you described; I don't know exactly how Equinox handles native code, so I'll just present them to you both.

Bundle-NativeCode requires at least one parameter

You use a Bundle-NativeCode header that just defines a library, and it seems you use Eclipse-PlatformFilter to specify what that library is intended for. Section 3.10 of the spec shows that you need at least one parameter for the library to be selected.

You can change your Bundle-NativeCode header to read

Bundle-NativeCode: ntfsacl/Release/NtfsAcl.dll;osname=win32

and your bundle will be able to find the right library.

Load only from your own bundle

Judging from your code, it could be possible that you define the library in one bundle, and try to load it in another; that doesn't work, a bundle can only load a library that it contains itself.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!