JNI packaging guidelines for optional native sub-package

Christopher ctubbsii at apache.org
Fri Jun 6 17:22:34 UTC 2014


On Wed, Jun 4, 2014 at 5:15 PM, Christopher <ctubbsii at 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@
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fedoraproject.org/pipermail/devel/attachments/20140606/71baa287/attachment.html>


More information about the devel mailing list