By Yolande Poirier-Oracle on May 22, 2014
Check out the Pi4J code to create a command from Twitter, to connect a camera, or sensors using I2C or any GPIO Raspberry Pi pins. Pi4J project is intended to provide a bridge between the native libraries and Java for full access to the Raspberry Pi.
You may want to create an interface for your project using JavaFX. There are simple steps to build a JavaFX interface.