我在运行 debian wheezy 的树莓派上的 Java 蓝牙服务器需要 bluecove 本机库 - 我在哪里可以找到它? [英] My Java bluetooth server on raspberry pi running debian wheezy needs bluecove native library - where can I find it?

查看:54
本文介绍了我在运行 debian wheezy 的树莓派上的 Java 蓝牙服务器需要 bluecove 本机库 - 我在哪里可以找到它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在 Windows 机器上运行的 Java 蓝牙服务器,我想将它移植到 Raspberry pi.我在 Java 方面有很多经验,但在蓝牙或 Linux 方面却很少.

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.

pi 目前有 Debian Wheezy 操作系统,我已经安装了蓝牙和 Java ok,并将 bluecove-gpl 和 bluecove jar 放在类路径中.

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.

但是,当我尝试运行服务器时,Java 会报错

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

本机库 bluecove_arm 不可用.

Native library bluecove_arm not available.

我尝试从 gpl jar 重命名 libbluecove_arm.so 没有成功,即使将 -Dbluecove.native.path 设置为指向它.

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?

[已解决}

在 google 代码站点上找到了一个 sh 构建脚本,它展示了如何编译 java 源文件、生成 jni 头文件、编译和链接 c 文件以生成 so 库文件.唯一的问题是库文件需要重命名为 libbluecove_arm.so 才能找到.全部在 pi 上完成!

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!

推荐答案

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.by/raspberry-pi-kak-rabotat-s-bluetooth-na-java/

这篇关于我在运行 debian wheezy 的树莓派上的 Java 蓝牙服务器需要 bluecove 本机库 - 我在哪里可以找到它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆