Calling Java from C/C++ can be tricky: JNI calls are complicated especially when dealing with non primivite types or arrays, performance issues must be kept in mind all the time and the code can be redundant (checking exceptions, checking returns of operations...).
Giws is a free software which greatly simplifies the call of Java method/object from C/C++ by generating a C++ wrapper on the Java object. Download GIWS
GIWS source code is available under the CeCILL license (known also as CeCILL-A), a GPL like license. The generated source code is released under the CeCILL-B license, a BSD like license.