Invoking C++ code from Java (GCJ)
I'm trying to invoke C++ from Java using GCJ using the CNI, so far I'm able to invoke Java code from C++. How can I invoke C++ from Java using the CNI?
I'll extend somewhat on pcent's answer to read the GCJ/CNI Docs.
I believe that the key is to understand the whole "CNI C++ class" concept.
Most of the documentation describes how the Java conventions translate in a CNI C++ class.
尝试阅读GCJ / CNI文档
I'm not a good Java-programmer, but I'm familar with C#/C++ interop. The best solution for me to call from native C++ to managed C# was using Callbacks . I think this applies also to JNI
Try reading: http://www.tidytutorials.com/2009/07/java-native-interface-jni-example-using.html
链接地址: http://www.djcxy.com/p/1182.html下一篇: 从Java调用C ++代码(GCJ)