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?
Asked
Active
Viewed 78 times
0
-
1Should be possible with `RegisterNatives()`: http://stackoverflow.com/questions/1010645/what-does-the-registernatives-method-do – Samuel Audet Feb 27 '15 at 03:18
1 Answers
0
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
.

alijandro
- 11,627
- 2
- 58
- 74