You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Marc-André Laverdière <ma...@gmail.com> on 2011/05/10 09:25:52 UTC
JNI Support?
Hello,
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).
Is there a way to tell buildr to set that properly when building the
eclipse files? What about the bundling of the jar?
Regards,
--
Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com
Re: JNI Support?
Posted by Alex Boisvert <al...@gmail.com>.
Hi Marc-André,
2011/5/10 Marc-André Laverdière <ma...@gmail.com>
> 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