Exceptions in JNI

Stephen Crowley stephenc at wf.net
Sun Jul 19 12:29:24 PDT 1998


Nope that didn't fix it. I tried to write up some simple code to
recreate the problem but it all works fine, it's only in my larger
project that it is having trouble. As far as I can tell I am doing
nothing wrong because most stuff "works" its just the exceptions are not
being caught. Could it be due to stack or heap problems?

--Stephen

Archie Cobbs wrote:
> 
> Stephen Crowley writes:
> > Are exceptions broken in the JNI or what? When trying to call a method
> > that uses StringTokenizer.tokenCount() it ALWAYS throws a
> > StringIndexOutOfBoundsException. I looked at the source to
> > StringTokenizer and it should catch the exception but it doesn't.
> > Running Kaffe 1.0 on linux
> 
> Try the patch below, it fixes a JNI bug whereby accessing the very
> last element of an array incorrectly causes an IndexOutOfBoundsException.
> ===================================================================
> RCS file: /cvs/mod/net/kaffe/kaffe/kaffevm/jni.c,v
> retrieving revision 1.1.1.2
> retrieving revision 1.1.1.2.2.1

<patch removed>


More information about the kaffe mailing list