<div dir="ltr">On Wed, Jun 4, 2014 at 5:15 PM, Christopher <span dir="ltr">&lt;<a href="mailto:ctubbsii@apache.org" target="_blank">ctubbsii@apache.org</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello all,<br>
<br>
I&#39;m working on packaging a jar which includes a java-only<br>
implementation, and optionally loads [System.load()] if configured to<br>
do so and the shared library is available.<br>
<br>
The actual (arch-dependent) shared library is provided in a separate<br>
sub-package (because it&#39;s optional). This means that technically, the<br>
jar can be noarch. Therefore, it makes much more sense to use the<br>
System.loadLibrary() call rather than enforce arch-dependent paths.<br>
<br>
The JNI packaging guidelines seem to written with the assumption that<br>
the package which includes the JNI jar also includes the .so, but<br>
that&#39;s not the case here, since the .so is optional and provided in a<br>
separate arch-dependent sub-package.<br>
<br>
What is the right packaging procedure here? I&#39;m inclined to think that<br>
using System.loadLibrary() is appropriate in these circumstances, and<br>
that the jar should be placed in the normal %{_javadir}/%{name} rather<br>
than the %{_jnidir} area, since it&#39;s technically noarch, and the JNI<br>
features are optional.<br>
<br>
--<br>
Christopher L Tubbs II<br>
<a href="http://gravatar.com/ctubbsii" target="_blank">http://gravatar.com/ctubbsii</a><br>
</blockquote></div><br>Adding devel@ to this question about packaging, since no response in 2 days from java-devel@<br></div></div>