Removed global reference to JNIEnv.  The Java documentation explicitly states that you cannot do this and may have been leading to application instability.

http://journals.ecs.soton.ac.uk/java/tutorial/native1.1/implementing/sync.html