I am trying to implement a simple application which enables C++ to do callbacks into Java. To this, I found some examples written many years ago by some people at MIT: https://github.com/swig/swig/tree/master/Examples/java/callback
However, when trying to run my own application, I get
Exception in thread "main" java.lang.UnsatisfiedLinkError: com.swig.demo.SwigDemo3JNI.swig_module_init()V
at com.swig.demo.SwigDemo3JNI.swig_module_init(Native Method)
at com.swig.demo.SwigDemo3JNI.<clinit>(SwigDemo3JNI.java:30)
at com.swig.demo.Caller.<init>(Caller.java:39)
at com.swig.demo.SwigTest.main(SwigTest.java:47)
Where SwigDemo3JNI is the Swig generated Java class, and SwigTest is the java class with main. Could anyone give me some insight on what I'm doing wrong?
You can set library path when init the app, the code below is used to do this:
Hope this help you!