问题描述
我想实现,关于我的MacBook Air笔记本采用蓝牙的Java应用程序。我尝试使用Java蓝牙库。
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.
我试图执行第一个例子中的但它抛出一个 BluetoothStateException
的消息: BlueCove库bluecove不可用
。我已经加入 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参数。
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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!