Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#712567: openjdk-7-jre-headless: Doesn't load JNI libraries from multiarch location

0 views
Skip to first unread message

Jakub Adam

unread,
Jun 17, 2013, 6:00:01 AM6/17/13
to
Package: openjdk-7-jre-headless
Severity: important

OpenJDK 7 doesn't search for JNI libraries in system multiarch location
/usr/lib/<arch>/jni.

With eclipse-cdt-jni package installed, following trivial program succeeds
on OpenJDK 6 (on amd64):

class Test {
public static void main(String[] args) {
System.loadLibrary("pty");
System.out.println("Library loaded successfully");
}
}

However, when run with OpenJDK 7, it ends with an exception:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no pty in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1856)
at java.lang.Runtime.loadLibrary0(Runtime.java:845)
at java.lang.System.loadLibrary(System.java:1084)
at Test.main(Test.java:4)

Regards,

Jakub


--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Gilles Filippini

unread,
Jul 13, 2013, 11:20:02 AM7/13/13
to
Hi,

Jakub Adam a écrit , Le 17/06/2013 11:48:
> Package: openjdk-7-jre-headless
> Severity: important
>
> OpenJDK 7 doesn't search for JNI libraries in system multiarch location
> /usr/lib/<arch>/jni.
>
> With eclipse-cdt-jni package installed, following trivial program succeeds
> on OpenJDK 6 (on amd64):
>
> class Test {
> public static void main(String[] args) {
> System.loadLibrary("pty");
> System.out.println("Library loaded successfully");
> }
> }
>
> However, when run with OpenJDK 7, it ends with an exception:
>
> Exception in thread "main" java.lang.UnsatisfiedLinkError: no pty in
> java.library.path
> at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1856)
> at java.lang.Runtime.loadLibrary0(Runtime.java:845)
> at java.lang.System.loadLibrary(System.java:1084)
> at Test.main(Test.java:4)

Same here occuring with package sikuli-ide looking for:
/usr/lib/<multiarch-triplet>/jni/libJXGrabKey.so

Here is an exerpt from the related strace log:
[pid 26342]
stat64("/usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386/libJXGrabKey.so",
0xb69df430) = -1 ENOENT (No such file or directory)
[pid 26342] stat64("/usr/java/packages/lib/i386/libJXGrabKey.so",
0xb69df430) = -1 ENOENT (No such file or directory)
[pid 26342] stat64("/usr/lib/jni/libJXGrabKey.so", 0xb69df430) = -1
ENOENT (No such file or directory)
[pid 26342] stat64("/lib/libJXGrabKey.so", 0xb69df430) = -1 ENOENT (No
such file or directory)
[pid 26342] stat64("/usr/lib/libJXGrabKey.so", 0xb69df430) = -1 ENOENT
(No such file or directory)
[pid 26342] write(2, "java.lang.UnsatisfiedLinkError: "...,
65java.lang.UnsatisfiedLinkError: no JXGrabKey in java.library.path) = 65

It looks for the native library into /usr/lib/jni instead of
/usr/lib/<multiarch-triplet>/jni.

Thanks,

_g.

signature.asc
0 new messages