A C++ template-based interface to the Java Native Interface (JNI)