nm /usr/local/lib/liblink-grammar-java.a | grep Java
However, when I was running maven, I received an UnsatisfiedLinkError. After MUCH googling I found:
http://www.nabble.com/Trouble-with-Java-Native-Libraries-td20293666.html
Simply setting the system property in maven for surefire is not sufficient, because maven changes the system property at runtime, which is too late for the VM to link to the library. Thus you need to use the following in your build section of your pom:
<plugin>
<groupid>org.apache.maven.plugins</groupid>
<artifactid>maven-surefire-plugin</artifactid>
<configuration>
<forkmode>once</forkmode>
<workingdirectory>target</workingdirectory>
<argline>-Djava.library.path=/usr/local/lib</argline>
</configuration>
</plugin>
After that, the VM will link to your libraries and surefire and all dependent tests should be able to see the java interfaces and access the necessary libraries.
No comments:
Post a Comment