This is for future reference for those coming up with this question:
Mark the answer provided by MyRevel on top of the raspberry pi forum. It worked like a charm!:)
For the sake of spreading a working solution that is easy to track, and because this question is the first result that appears on google, I retell the steps from the answer above (I made some minor changes, but the effect is the same):
Download bluecove-2.1.0.jar and bluecove-gpl-2.1.0-sources.tar.gz from http://code.google.com/p/bluecove/downloads/list or http://sourceforge.net/projects /bluecove/files/BlueCove/2.1.0/ .
On RPi using terminal or SSH:
Create a compilation space and extract the source files:
`mkdir -p ~/temp/bluecove/target/` `cd ~/temp` `tar xf bluecove-gpl-2.1.0-sources.tar.gz` `mv ~/Downloads/bluecove-2.1.0.jar ~/temp/bluecove/target/bluecove-2.1.0.jar`
The temp folder now contains two folders: bluecove-gpl-2.1.0 and bluecove.
Edit build.xml file:
nano ~/temp/bluecove-gpl-2.1.0/build.xml Delete text '-SNAPSHOT' on line 12 of build.xml: from: <property name="product_version" value="2.1.0-SNAPSHOT"/> to: <property name="product_version" value="2.1.0"/> Save file: `Ctrl+X` then `Y` and `Enter`.
Install the bluetooth packages and packages necessary for compilation:
sudo apt-get update && apt-get upgrade && apt-get autoremove sudo apt-get install bluetooth bluez-utils blueman sudo apt-get install libbluetooth-dev
Connect the Bluetooth dongle and test if Bluetooth OK:
/etc/init.d/bluetooth status
Compilation start:
cd ~/temp/bluecove-gpl-2.1.0 ant all
Upon successful compilation, you can find the required gpl jar in:
~/temp/bluecove-gpl-2.1.0/target/bluecove-gpl-2.1.0.jar
Finally...
Move the generated bluecove-gpl-2.1.0.jar along with the downloaded bluecove-2.1.0.jar to the java path library directory for your java development program.
Running your Java program using the bluecove libraries can be done as follows:
java -cp /path/to/MyJavaProgram.jar:/path/to/bluecove_libs/ myjavaprogram.MyJavaProgram
The -cp switch allows us to specify a list of files and directories to include. Each directory and file are separated by a colon (:).
In this case, we want to include MyJavaProgram.jar and all the files in the bluecove_libs directory.
The last parameter tells java from which the package and the main () class should be executed.
Note that /path/to/bluecove_libs/ will contain the following files:
bluecove-gpl-2.1.0.jar → the file we compiled abovebluecove-2.1.0.jar file downloaded from the Internet