Need GetEnv Java 2 invokation function for JVMDI

Archie Cobbs archie at
Tue Jan 11 15:31:39 PST 2000

Derek L Davies writes:
> I'd like to get some input on the following problem.
> To obtain a JVMDI interface pointer the JVMDI spec says a JVMDI client
> should invoke the Java 2 invokation interface function named "GetEnv".
> I've only now realized that Kaffe doesn't do Java 2.  The JVMDI spec
> gives this example:
> JVMDI_Interface_1* jvmdi;
> (*jvm)->GetEnv(jvm, &jvmdi, JVMDI_VERSION_1);
> So, by the letter of the spec, I'm out of luck trying to implement
> JVMDI until we have (at least some of) Java 2.  Or I could call
> back directly into the VM as a crude, ugly AND disfunctional stopgap
> measure.
> So, is anyone working on Java 2?  If so, I'd like to work with them.
> Otherwise, I'm thinking it seems not too bad to add GetEnv to the
> invokation interface inside an "#ifdef JNI_VERSION_1_2" block.  From a
> quick glance at the JNI spec it looks like the only new function in
> the Java 2 version of the table is GetEnv and it's been appended to
> the table.  There is also the matter of changing JNI_CreateJavaVM to
> recognize "vm_args.version = 0x00010002;" and how ugly that may or may
> not end up being.  How bad would it be to just return the extra table
> entry regardless of vm_args.version (as long as JNI_VERSION_1_2 is
> defined) until we get full Java 2?

When you say "Java 2" what exactly do you mean? Kaffe has much
of the Java2 platform already implemented, though much is also missing.
In general though, it attempts to be Java2 compatible.

If 'GetEnv' is missing, then we should just add it. There's no
need for #ifdef JNI_VERSION_1_2 or anything (we've never used it
up to now).


Archie Cobbs   *   Whistle Communications, Inc.  *

More information about the kaffe mailing list