Add relevant JNI code

Signed-off-by: Umair Khan <omerjerk@gmail.com>