[BRLTTY] BRLTTY Java bindings -- UnsatisfiedLinkError
Mario Lang
mlang at delysid.org
Tue May 26 08:45:00 EDT 2009
Simon Meers <drmeers at gmail.com> writes:
> Hmm, apparently I spoke too soon -- the Java code connects fine, but as soon
> as you try to do anything with the connection it crashes!
I at least found where it crashes, and how to tell jvm to be a bit
more verbose about the error. In C terms, it crashes during
the GET_ID macro, in the line
if (!((id) = (*(jenv))->GetFieldID((jenv), (class), (field), (sig)))) {\
If you invoke java with -Xcheck:jni, suddenly the JVM is a lot
more friendly about the actual error:
fzidpc73:/tmp# java -Xcheck:jni -Djava.library.path=/usr/lib/jni -classpath .:/usr/share/java/brlapi.jar test
FATAL ERROR in native method: Instance field not found in JNI get/set field operations
at org.a11y.BrlAPI.Native.openConnection(Native Method)
at org.a11y.BrlAPI.Brlapi.<init>(Brlapi.java:28)
at test.main(test.java:5)
Aborted
However, this error now seems to happen in openConnection, not
getDriverName. Something with GET_ID is very broken, but
I am not familiar enough with JNI programming to spot the error.
Maybe someone else could take a look? Who wrote this code?
--
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