I\'m developing a web service which is using native code via JNI.
Could I pack those dll\'s into my war?
I\'ve tired to manage them independently...
PS I\'m usin
If your dependency does not have
, it will get included in the war file no matter the type (jar, zip, etc, unless it's another war).
While this is true, there is however the problem that you need to have the native library (.so
, .dll
) on your java.library.path
. EJP's concerns are valid. However, if you play around with the assembly plugin and have the dll placed under the /META-INF
directory of your war file, you can easily knock up some code that extracts that dll from the classpath /META-INF/my.dll
and places it in a directory on the java.library.path
.
This is far from being anything remotely close to good practice, but I believe you can hack it like this.