Not trivial to solve. One solution is to run a Python script and capture the output. This can be acomplished by using the
adafruit dht11 libary.
Please find attached example containing the adafruit library and a B4J non-ui application. The B4J non-ui applications runs the python script and captures the output.
Solution successfully tested on a Raspberry Pi via the B4J Bridge. DHT11 connected to GPIO23.
Please read the readme.txt for the installation steps on the raspberry pi.
Application Started with Argument: simpletest.py
Python Script successfully executed. Output:
Temp=17.0*C Humidity=40.0%
There might be other solutions.
Good Luck.