Installing rxtx bundle in my Raspberry

人盡茶涼 提交于 2019-12-02 09:31:02

Jorge's response is correct. Have you physically examined the bundle being created by Eclipse to confirm your nativelib directory is present? When exporting the bundle from Eclipse, you have to ensure you specify which folders and files are included in the build. This is done by opening the build.properties file and placing a check mark by the folder/files you wish to include.

You need to embed native libraries in your bundle (inside the jar or in a fragment).

I.e if you place your library here:

/this/is/yournative/package/librxtxSerial.so

you can use this manifest entry:

Bundle-NativeCode: this/is/yournative/package/librxtxSerial.so;osname="Linux";processor="armv6l"

Note that OSGi loads native libs by extracting them to a temporal folder and then loads them.

Use this bundle rxtx osgi. It should contain all you need.

Thanks all for your responses! The bundle is Active!

I used this link to get rxtx sources and to compile my native sources: https://blogs.oracle.com/jtc/entry/java_serial_communications_revisited

and I updated the build.properties to include the native library.

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