I have a Java program that makes JNI calls to a C++ DLL that I compiled. This works fine.
However, in order to integrate my Java program into a C++ GUI I am working on (don't ask why I need to do this), I am trying to wrap that Java code in a C++ JNI call. Effectively I am trying:
C++ code makes JNI call to Java. (This works fine) Java makes a JNI call to a different C++ DLL that I compiled开发者_运维知识库.
I can load the C++ DLL no problem in Java, but when I try to make the second JNI call to the C++ DLL it just seems to quietly ignore the call and immediately exits the Java function without finishing it, but it does return back to the original C++ code and finished executing fine (so it doesn't crash).
Is it possible to do what I am trying to do? Is there something special I need to do to load the C++ DLL (it is also dependent on other DLLs, but these are all on my path)?
Thanks, -Zach
Nevermind, figured it out. Calling from C++ through JNI to Java and then through JNI again to a different C++ DLL is possible, I just needed to get all my DLLs and jars on the proper paths.
精彩评论