How to use JNI in a Dynamic web project?

436 Views Asked by At

I've written a native method to access port. I am able to run the JNI in a simple Java project. However, when I try to run it in a web project, I'm getting an exception like this:

Exception in thread "main" java.lang.UnsatisfiedLinkError:

1

There are 1 best solutions below

0
On

Put your library into one of the following places:

  • WEB-INF/lib
  • your app server's lib directory
  • the JVM lib

I hope that it will work.