We use some libraries from the Pi4J project to connect Java with the GPIO pins. This must be installed for any devices that plan to use a GPIO pin, like a switch or an LED.

curl -s get.pi4j.com | sudo bash

This installs the pi4j libraries on your raspberry Pi. Once installed, you can upgrade using the following command: pi4j --update

IoT one Cloud can find this library automatically, no need to worry about installation location.