Exceptions in JNI

Stephen Crowley kaffe@rufus.w3.org
Sun, 19 Jul 1998 14:29:24 -0500


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>