Hi Marc-André,

2011/5/10 Marc-André Laverdière <[email protected]>

> For my project, I wanted to add SIGAR for some system status reporting.
> I have an interesting problem though, as the jar doesn't include the .so
> files.
>
> I tried putting the libs in the jar, and then did a buildr eclipse.
> But then, in Eclipse, it complained that it didn't find the library,
> and that a variable needed to be set (java.library.path).
>

Merely putting native libraries in the jar doesn't work -- afaik, they would
need to be explicitly loaded by the application with System.loadLibrary().


> Is there a way to tell buildr to set that properly when building the
> eclipse files? What about the bundling of the jar?
>

There currently no way to set native library paths in the generated Eclipse
project configuration -- that would be a welcome improvement.  In the mean
time, you can just open the Java Build Path in Eclipse and set it there
after generating the Eclipse project.

alex
  • JNI Support? Marc-André Laverdière
    • Re: JNI Support? Alex Boisvert

Reply via email to