I ran into a similar problem when integrating Java and JOGL - my solution was to manage buffer resources in C and use JNI to pass a pointer to the buffer in Java using the method
jobject NewDirectByteBuffer(JNIEnv * env, void * address, jlong capacity);
jni.h. , , "", java.nio.Buffer. , C, C .