[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Another Classpath / Kissme incompatibility

From: Stephen Crawley
Subject: Re: Another Classpath / Kissme incompatibility
Date: Sun, 27 Apr 2003 01:06:38 +1000

> Casey Marshall <address@hidden> writes:

> > This doesn't fix it for me with JikesRVM. Namely GetStaticMethodID
> > returns NULL (but GetMethodID(env, clazz, "<init>", "(J)V") doesn't,
> > oddly), and ExceptionCheck is apparently unimplemented.

You are right about GetStaticMethodID versus GetMethodID.  The JNI spec
says that GetMethodID should be used to get a constructor.  The fact that
GetStaticMethodID works for Kissme is a bug.

The ExceptionCheck method is a JNI 1.2 extension.  (And it's trivial to
implement ...)  However, if JikesRVM doesn't implement it, you could possibly
replace it with "(*env)->ExceptionOccured(env) != NULL".

> > This patch seems to work for me, but I'm not sure if this is the way
> > the initialization should be done (i.e. it assigns in, out, and err
> > invalid FileDescriptors first, then the nativeInit() method fills in
> > their correct nativeFd values).
> > 
> > I'm no JNI expert, so this could be wrong.

Without this change, I found that the static FileDescriptor fields had value
null; i.e. they were being clobbered after nativeInit9) had set them.  I didn't
look at the bytecodes, but my guess is that Jikes is emitting an opcode to
initialize the fields, even though this may be notionally unnecessary.

> Stephen could you let us know if this also works for you?
> Brian
> -- 
> Brian Jones <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]