[BRLTTY] BRLTTY Java bindings -- UnsatisfiedLinkError

Simon Meers drmeers at gmail.com
Sat May 23 06:35:38 EDT 2009


Thanks Mario; it has been many years since I last used Java. However I've
still not got it working...

It is not enough to merely have brlapi.jar in the classpath, you also
> need Bindings/Lisp/libbrlapi_java.so on your java.library.path.
>
> Try -Djava.library.path=/path/to/build/Bindings/Java
>

Tried; no luck. Tried with and without quotes around path, with and without
trailing slash, with and without filename appended. Zip.


> or install into something like /usr/lib/jni, depending on how your
> distro packages java exactly.


Tried symlinking libbrlapi_java.so into /usr/lib/jni, /usr/lib/java (it was
actually already there courtesy of make install), /usr/lib/jvm,
/usr/lib/jvm/java-6-sun/lib and many other such permutations, but the same
error occurs.


> You might also get away by adding libbrlapi_java.so to the brlapi.jar
> directly.


Also tried, but without success. The same UnsatisfiedLinkError persists.

I have a feeling I'm going to look very silly when the solution is revealed,
but I'm out of ideas for now...

-----------------

$cat test.java
> import org.a11y.BrlAPI.*;
>
> public class test{
>     public static void main(String[] args){
>         Brlapi b = new Brlapi(new ConnectionSettings());
>     }
> }
> $javac -classpath /media/d/Development/brltty/Bindings/Java/brlapi.jar
> test.java
> $java -classpath .:/media/d/Development/brltty/Bindings/Java/brlapi.jar
> -Djava.library.path=/media/d/Development/brltty/Bindings/Java test
> Exception in thread "main" java.lang.UnsatisfiedLinkError:
> org.a11y.BrlAPI.Native.openConnection(Lorg/a11y/BrlAPI/ConnectionSettings;Lorg/a11y/BrlAPI/ConnectionSettings;)I
>     at org.a11y.BrlAPI.Native.openConnection(Native Method)
>     at org.a11y.BrlAPI.Brlapi.<init>(Brlapi.java:28)
>     at test.main(test.java:5)
> $
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mielke.cc/pipermail/brltty/attachments/20090523/b8fe6ed4/attachment.html 


More information about the BRLTTY mailing list