This project is available for download and can be opened within NetBeans. The only thing we need to do is change the project's properties so it is able to be run on the Raspberry Pi. When the project is opened, go to the project's Properties and by selecting the Run node on the left side, we can change the Runtime Platform to the Raspberry Pi platform. This is explained in detail in Chapter 1, Setting up Your Raspberry Pi, in the Our First Remote Java Application section.
For our project, we need a couple of libraries. We will be using the libraries from the Pi4J project that enable us to interact with the Raspberry Pi pins and use BlueCove libraries to be able to interact with the Bluetooth chip.
Although the libraries are available in the project, it will be useful to know how these are added to the project if you start afresh. This will be...