classpath
[Top][All Lists]
Advanced

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

Re: RFC: Require VM to provide JNI 1.2 support?


From: Dalibor Topic
Subject: Re: RFC: Require VM to provide JNI 1.2 support?
Date: Mon, 21 Jun 2004 08:09:04 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040608

Steven Augart wrote:
Steven Augart wrote:

Mark has suggested that it might be a good idea for the next release
of GNU Classpath to require that the VM provide JNI 1.2.  He's asked
me to post this Request for Comments on the idea.


Any objections to making it JNI 1.4 instead of JNI 1.2?  I believe it would
not be much of a burden on VM Implementors; there are only three new functions involved, and they can all be stubbed out. On the other hand, there appears to
be the potential of major efficiencies.

To quote from the Sun JNI spec:

Three new functions introduced in SDK/JRE 1.4 allow JNI code to create, examine, and manipulate direct buffers:

    * NewDirectByteBuffer
    * GetDirectBufferAddress
    * GetDirectBufferCapacity

Every implementation of the Java virtual machine must support these functions, but not every implementation is required to support JNI access to direct buffers. If a JVM does not support such access then the NewDirectByteBuffer and GetDirectBufferAddress functions must always return NULL, and the GetDirectBufferCapacity function must always return -1. If a JVM does support such access then these three functions must be implemented to return the appropriate values.

Sounds good for me.

cheers,
dalibor topic




reply via email to

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