问题
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.
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.
What is the problem? How can I use BlueCove with my MacBook Air?
回答1:
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.
来源:https://stackoverflow.com/questions/4938809/how-do-i-use-bluecove-to-use-bluetooth-on-a-macbook-with-java