In case you want to read the data from various I2C sensors connected to Raspberry Pi the difficult part is usually writing a piece of code which talks to the I2C sensor.
rpi-drivers is a Java library implementing simple APIs and communication code for some widely used I2C sensors. You can easily measure temperature, pressure and humidity, get ambient light intensity or measure voltage in your java Raspberry Pi projects.
Supported sensors are:
Simply include rpi-drivers dependency into your Java Gradle or Maven project, and you are good to go!