How to use JNI in a Dynamic web project?

411 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 answers

0
AlexR 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.