如何使用 BlueCove 在带有 Java 的 MacBook 上使用蓝牙? [英] How do I use BlueCove to use Bluetooth on a MacBook with Java?

查看:18
本文介绍了如何使用 BlueCove 在带有 Java 的 MacBook 上使用蓝牙?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的 MacBook Air 笔记本电脑上实现一个使用蓝牙的 Java 应用程序.我尝试使用 Java 蓝牙库 BlueCove.

I would like to implement an Java application that uses Bluetooth on my MacBook Air laptop. I try to use the Java bluetooth library BlueCove.

我尝试实现第一个示例 DeviceDiscovery 但它抛出带有消息的 BluetoothStateException:BlueCove library bluecove not available.我已将 bluecove-2.1.0.jar 添加到 Eclipse 中的构建路径.

I tried to implement the first example DeviceDiscovery but it throws an BluetoothStateException with the message: BlueCove library bluecove not available. I have added bluecove-2.1.0.jar to my Build Path in Eclipse.

有什么问题?如何将 BlueCove 与 MacBook Air 配合使用?

What is the problem? How can I use BlueCove with my MacBook Air?

推荐答案

BlueCove 需要 32 位 JVM 才能运行.将 -d32 参数添加到 java 以强制 32 位 JVM 将解决该问题.您可以在 Eclipse 中的 VM Arguments 下为启动配置执行此操作.

BlueCove requires the 32-bit JVM to run. Adding the -d32 argument to java to force the 32-bit JVM will fix the problem. You can do this in Eclipse under VM Arguments for the launch configuration.

这篇关于如何使用 BlueCove 在带有 Java 的 MacBook 上使用蓝牙?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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