UnsatisfiedLinkError when using a JNI native library from Grails application

前端 未结 2 1498
不思量自难忘°
不思量自难忘° 2021-01-06 03:44

I have an application where I need to use a Native Library: libfoo.so

My code is as follows:

Accessor.java:

pub         


        
2条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-06 04:07

    My guess is that the Accessor class is being loaded multiple times in different classloaders within the same JVM (assuming grails runs in the same JVM as the embedded Tomcat). Test this by adding debug statements to the static block.

提交回复
热议问题