On Wed, Jun 4, 2014 at 5:15 PM, Christopher <ctubbsii@apache.org> wrote:
Hello all,

I'm working on packaging a jar which includes a java-only
implementation, and optionally loads [System.load()] if configured to
do so and the shared library is available.

The actual (arch-dependent) shared library is provided in a separate
sub-package (because it's optional). This means that technically, the
jar can be noarch. Therefore, it makes much more sense to use the
System.loadLibrary() call rather than enforce arch-dependent paths.

The JNI packaging guidelines seem to written with the assumption that
the package which includes the JNI jar also includes the .so, but
that's not the case here, since the .so is optional and provided in a
separate arch-dependent sub-package.

What is the right packaging procedure here? I'm inclined to think that
using System.loadLibrary() is appropriate in these circumstances, and
that the jar should be placed in the normal %{_javadir}/%{name} rather
than the %{_jnidir} area, since it's technically noarch, and the JNI
features are optional.

--
Christopher L Tubbs II
http://gravatar.com/ctubbsii

Adding devel@ to this question about packaging, since no response in 2 days from java-devel@