[BRLTTY] BRLTTY Java bindings -- UnsatisfiedLinkError
Mario Lang
mlang at delysid.org
Sat May 23 09:09:04 EDT 2009
Simon Meers <drmeers at gmail.com> writes:
> 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.
[...]
> $cat test.java
>> import org.a11y.BrlAPI.*;
>>
>> public class test{
>> public static void main(String[] args){
>> Brlapi b = new Brlapi(new ConnectionSettings());
>> }
>> }
Ah, the problem is actually in your test code.
If you had looked at Bindings/Java/Test.java you would have seen the
line
System.loadLibrary("brlapi_java");
Arguably, this is actually a deficiency in the Java bindings.
As far as I know, the right way to do this is to execute this line
of code in some class in a static block so that it automatically
happens when the class is loaded. Maybe in Native.java?
However, until this is fixes, you need to manually instruct the JVM to
load libbrlapi_java.so before you can actually use the Brlapi classes.
--
CYa,
⡍⠁⠗⠊⠕ | Debian Developer <URL:http://debian.org/>
.''`. | Get my public key via finger mlang/key at db.debian.org
: :' : | 1024D/7FC1A0854909BCCDBE6C102DDFFC022A6B113E44
`. `'
`- <URL:http://delysid.org/> <URL:http://www.staff.tugraz.at/mlang/>
More information about the BRLTTY
mailing list