Skip to content

Unable to load library 'X11' with 3.3.0, fine with 3.2.7 #12

@tulskiy

Description

@tulskiy

Here is a simple class that loads an X11 library and maps some function:

public class Test {
    static {
        Native.register("X11");
    }

    public static native Pointer XOpenDisplay(String name);


    public static void main(String[] args) {
        XOpenDisplay(null);
    }
}

it all works fine with jna 3.2.7, but with 3.3.0, I get the following exception:

Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'X11': com.sun.jna.Native.open(Ljava/lang/String;)J
    at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:166)
    at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:239)
    at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:202)
    at com.sun.jna.Native.register(Native.java:1032)
    at com.tulskiy.keymaster.Test.<clinit>(Test.java:12)

it seems to be finding the library fine, but always fails in Native.open(). Interface mapping fail as well. I'm running Ubuntu 10.10 32-bit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions