If you use C ++ as the target language, you should use JNI ( http://java.sun.com/docs/books/jni/ ). JNI defines an interface for exchanging data and method calls from / to Java and native code. Simply write the JNI wrapper for a class that contains methods that return and accept simple input parameters (these are native types, without a collection, without arrays). When methods are associated with classes, collections, arrays, etc., it can quickly become cumbersome to manually write a JNI wrapper. This article provides a good overview: http://java.sys-con.com/node/45840 . In this case, you can evaluate a wrapper generator such as GIWS: http://www.scilab.org/products/other/giws .
If you use the .NET environment as the target platform, then IKVM is one option. However, when we had to do this for the present project, we preferred JNBridge, and we successfully managed this (commercial) tool. We did not value IKVM for business reasons: our client only wanted officially supported middleware.
source share