My Java bluetooth server on raspberry pi running debian wheezy needs bluecove native library - where can I find it?

帅比萌擦擦* 提交于 2019-12-07 20:19:25

问题


I have a Java bluetooth server running on a Windows box which I want to port to the Raspberry pi. I have lots of experience with Java but little with Bluetooth or Linux.

The pi currently has Debian Wheezy operating system and I've installed bluetooth and Java ok, and placed the bluecove-gpl and bluecove jars in the classpath.

When I try to run the server, however, Java complains

Native library bluecove_arm not available.

I've tried renaming libbluecove_arm.so from the gpl jar without success, even when setting -Dbluecove.native.path to point to it.

Does anyone know where to find the correct library, what it should be called, and where it should be placed?

[SOLVED}

Found a sh build script on the google code site which showed how to compile the java source files, generate jni headers, compile and link the c files to produce a so library file. Only hiccup was that the library file needed then to be renamed libbluecove_arm.so before it would be found. All done on the pi!


回答1:


mkdir bluecovelib

cd bluecovelib

wget http://snapshot.bluecove.org/distribution/download/2.1.1-SNAPSHOT/2.1.1-SNAPSHOT.63/bluecove-gpl-2.1.1-SNAPSHOT-sources.tar.gz

tar -zxvf bluecove-gpl-2.1.1-SNAPSHOT-sources.tar.gz

mkdir -p bluecove/target

cd bluecove/target

wget http://snapshot.bluecove.org/distribution/download/2.1.1-SNAPSHOT/2.1.1-SNAPSHOT.63/bluecove-2.1.1-SNAPSHOT.jar

cd ../../bluecove-gpl-2.1.1-SNAPSHOT
ant all

http://privateblog.info/raspberry-pi-kak-rabotat-s-bluetooth-na-java/



来源:https://stackoverflow.com/questions/12597986/my-java-bluetooth-server-on-raspberry-pi-running-debian-wheezy-needs-bluecove-na

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