|
|
Re: Using JNI [message #1638989 is a reply to message #1635405] |
Fri, 27 February 2015 11:53 |
Davide De Cesaris Messages: 30 Registered: January 2015 |
Member |
|
|
Hi Dave,
thanks for you reply. Inserting a trailing "*" in Bundle-NativeCode:
Bundle-NativeCode: natives/mylib.so; osname=Linux; processor=ARM, *
solved the issue with the bundle export. Anyway, in bundle activator, when I try to call the loadLibrary() method I receive this error:
java.lang.UnsatisfiedLinkError: no mylib in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1878)
at java.lang.Runtime.loadLibrary0(Runtime.java:849)
at java.lang.System.loadLibrary(System.java:1087)
...
I read somewhere that it is unnecessary to specify java.library.path in the newer version of OSGi, is it true? In the pom.xml file of serial bundle [1], the maven plugin configures that variable:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.7.2</version>
<configuration>
<systemPropertyVariables>
<java.library.path>${project.basedir}/src/main/lib</java.library.path>
</systemPropertyVariables>
</configuration>
</plugin>
If I should do the same, is there a way to specify the java.library.path in the MANIFEST?
[Updated on: Sat, 28 February 2015 08:56] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02493 seconds