Updated JNI class loader. Need to fix small issue

Need to get JNIEnv pointer. Currently it throws a SIGSEGV signal when
trying to assign JNIEnv pointer to a global variable.