开发者

Building a maven project with external JNI libraries

I'm developing a program on MacOSx that uses third party jar files that all use JNI to call C functions.

How can I include those on my build path and set the java.library.path to use the external dependencies properly ? I would like to avoid having to install anything in my maven repository. This is important since I'll have to deploy my program to other linux platforms as well, which already have those third-party jars and C libraries installed somewhere...

For now what I've done is adding my jar dependencies 开发者_运维问答with scope=system and systemPath pointing to the full path of my jar files, but I don't know how to set the os-specific dependencies...

Regards,

Philippe


Could you use:

<dependency>
          <groupId>foo</groupId>
          <artifactId>bar</artifactId>
          <version>1.0.0</version>
          <scope>provided</scope>
          <systemPath>/my/path/to/c_libs_folder/myexecutable.jar</systemPath>
 </dependency>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜