[fedora-java] /usr/lib/jni support in Fedora

David Walluck david at zarb.org
Tue Jul 29 16:18:20 UTC 2014


On 07/29/2014 11:34 AM, Omair Majid wrote:
> If it helps, changes we manage to push into OpenJDK should show up
> sooner or later in proprietary JDKs. That said, I agree, a scheme that
> makes it harder to use proprietary JDKs would undo a lot of work Fedora
> (and JPackage) have put into the Java packaging guidelines.

I have to admit, I am really not following the proposed change here nor 
the reason for it.

I can say that the reason for moving the jni libdir is that libraries in 
%{_libdir} are dynamically linked vs. dlopened like JNI libs are.

Otherwise, %{_jnidir} has always been %{_prefix}/lib/java (even on 
64-bit) as it was created before multiarch support. After which, I 
believe certain Linux distros may have changed it to %{_libdir}/java, 
but on Fedora it seems to be %{_prefix}/lib/java.

On Debian, they use /usr/lib/jni (the equivalent of /usr/lib/java on 
Fedora). It is different because they put any jars which dlopen into 
/usr/lib/java.

Debian does patch openjdk to search /usr/lib/jni:/lib:/usr/lib plus the 
multiarch equivalent (cf. 
<http://code.ohloh.net/file?fid=NMn8r1Wko1rlfhxLd2cwIvqpuPU&cid=vP7_57sIM8s&s=&fp=5549&mp=&projSelected=true#L0>).



More information about the java-devel mailing list