I have an native C++ application that creates a JVM (JNI_CreateJavaVM()), which executes a method in a specified class. I now want to call C++ functions from java using JNI. Is it possible to avoid System.loadLibrary() or do I have to create an extra dll just for JNI calls?
Your native C++ application is PE executable without JNI symbols exported. That means you can't mix your JNI method in your native executable, in order to call C++ functions from Java, you have to create another dll and load it with System.loadLibrary
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.