I'm having a problem with trying to get Maven to load my native library. Currently, I placed my library file (.so) in src/main/resources/ and it gives me an error of it cannot be found in java.library.path. I also tried to place this in my base directory of the project, but gives me the same results.
Below is the maven plugin I tried, but it doesn't seem to work.
org.apache.maven.plugins
maven-surefire-plugin
java.library.path
${project.build.directory}
If it helps, I run my project directly from Eclipse. I know how to get it to work in Eclipse but want it to work with maven.
@EDIT I also tried running it on the command line and I still receive the same mistakes
解决方案
I did the following in my project:
org.apache.maven.plugins
maven-surefire-plugin
-Djava.library.path=/path/to/your/libs:${java.library.path}
And it worked for me that way.