Bug#858876: libjna-jni: causes NoClassDefFoundError
Emmanuel Bourg
ebourg at apache.org
Tue Apr 18 09:15:46 UTC 2017
Le 18/04/2017 à 00:07, Emmanuel Bourg a écrit :
> I'll get another look.
I wrote a simple test case:
import com.sun.jna.platform.unix.X11;
public class JNATest {
public static void main(String[] args) throws Exception {
System.setProperty("jna.boot.library.name", "jnidispatch.foo");
System.out.println("XAllocSizeHints: " + X11.INSTANCE.XAllocSizeHints());
}
}
Compiled and executed with the system JNA jar:
java -cp .:/usr/share/java/jna.jar:/usr/share/java/jna-platform.jar JNATest
And this always works, even if the jna.boot.library.name property
contains a bogus name.
Renaming libjnidispatch.system.so to libjnidispatch.so triggers
an UnsatisfiedLinkError.
I checked again the JNA code and there is no other occurrence of
jna.boot.library.* besides the ones removed in 4.2.2-3.
This issue really looks like an embedded jar. If it isn't in netbeans
directly, it could be in one of its dependencies.
More information about the pkg-java-maintainers
mailing list