Could I pack native DLLs into WAR?

后端 未结 6 588
迷失自我
迷失自我 2021-01-13 19:07

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

6条回答
  •  时光取名叫无心
    2021-01-13 19:10

    @carlspring: You'll have to be lucky to have write access to any directory in java.library.path. (i.e. Program Files\Java etc) A better practice might be to unpack the dll's to a temp directory and add this directory to java.library.path at runtime. This is possible: http://fahdshariff.blogspot.nl/2011/08/changing-java-library-path-at-runtime.html

提交回复
热议问题