.... [exec] checking jni.h usability... no [exec] checking jni.h presence... no [exec] checking for jni.h... no [exec] configure: error: Native java headers not found. Is $JAVA_HOME set correctly? BUILD FAILED make sure $JAVA_HOME set correctly.
This means build is using incorrect java installation. To make sure JAVA_HOME is pointing to the correct one use apt-file search - searches in all packages installed in your system.
apt-file search jni.hAnd then set JAVA_HOME accordingly.