Friday, 15 January 2010

jni - Maven - UnsatisfiedLinkError with java.library.path -


I'm having trouble trying Maven to load my original library. Currently, I placed my library file (.so) in the src / main / resources / and I can not find an error in I java.library.path. I also tried to place the project in my base directory, but I got this result.

Below I tried the Maven plugin, but it does not seem to work.

  & lt; Plugin & gt; & Lt; Group & gt; Org.apache.maven.plugins & lt; / Group & gt; & Lt; ArtifactId & gt; Maven- Perfect-plugin & lt; / ArtifactId> & Lt; Configuration & gt; & Lt; SystemProperties & gt; & Lt; Property & gt; & Lt; Name & gt; Java.library.path & lt; / Name & gt; & Lt; Price & gt; $ {Project.build.directory} & lt; / Pricing & gt; & Lt; / Property & gt; & Lt; / SystemProperties & gt; & Lt; / Configuration & gt; & Lt; / Plugin & gt;   

If this helps, then I will run my project directly from Eclipse. I know how to get it to work in eclipse, but it wants to work with Maven.

@EDIT I ​​also tried to run it on the command line and I still got the same mistake

I did the following in my project:

  & lt; Plugins & gt; & Lt; Plugin & gt; & Lt; Group & gt; Org.apache.maven.plugins & lt; / Group & gt; & Lt; ArtifactId & gt; Maven- Perfect-plugin & lt; / ArtifactId> & Lt; Configuration & gt; & Lt; ArgLine & gt; -Djava.library.path = / path / to / your / libs: $ {java.library.path} & lt; / ArgLine & gt; & Lt; / Configuration & gt; & Lt; / Plugin & gt; & Lt; / Plugins & gt;   

And it worked like this for me.

No comments:

Post a Comment