
********************************************************************************
********************************************************************************
01 Nov 2002 (Released)
Implemented the TJNIEnv.NewObject method. It had been left unimplemented since
the first version.


********************************************************************************
********************************************************************************
16 Mar 2002
Added support for J2SDK v 1.4
02 Apr 2002 (Released)
Changed WIN32 directive to MSWINDOWS

Changes to support J2SDK v1.4:
The changes to the JNI are documented by Sun here:
http://java.sun.com/j2se/1.4/docs/guide/jni/jni-14.html

================================================================================
  Added the constant for version 1.4:

  const
    JNI_VERSION_1_1 = JInt($00010001);
    {$EXTERNALSYM JNI_VERSION_1_1}
    JNI_VERSION_1_2 = JInt($00010002);
    {$EXTERNALSYM JNI_VERSION_1_2}
    JNI_VERSION_1_4 = JInt($00010004);
    {$EXTERNALSYM JNI_VERSION_1_4}


================================================================================
JNIInvokeInterface_
  Added AttachCurrentThreadAsDaemon method:

  JNIInvokeInterface_ = packed record
    reserved0: Pointer;
    reserved1: Pointer;
    reserved2: Pointer;
    DestroyJavaVM: function(PVM: PJavaVM): JInt; {$IFDEF MSWINDOWS} stdcall; {$ENDIF} {$IFDEF LINUX} cdecl; {$ENDIF}
    AttachCurrentThread: function(PVM: PJavaVM; PEnv: PPJNIEnv; Args: Pointer): JInt; {$IFDEF MSWINDOWS} stdcall; {$ENDIF} {$IFDEF LINUX} cdecl; {$ENDIF}
    DetachCurrentThread: function(PVM: PJavaVM): JInt; {$IFDEF MSWINDOWS} stdcall; {$ENDIF} {$IFDEF LINUX} cdecl; {$ENDIF}
    GetEnv: function(PVM: PJavaVM; PEnv: PPointer; Version: JInt): JInt; {$IFDEF MSWINDOWS} stdcall; {$ENDIF} {$IFDEF LINUX} cdecl; {$ENDIF}

      // J2SDK1_4
    AttachCurrentThreadAsDaemon: function(PVM: PJavaVM; PEnv: PPJNIEnv; Args: Pointer): JInt; {$IFDEF MSWINDOWS} stdcall; {$ENDIF} {$IFDEF LINUX} cdecl; {$ENDIF}
  end;

================================================================================
JNINativeInterface_
  Added NewDirectByteBuffer, GetDirectBufferAddress, and GetDirectBufferCapacity
  methods:

  JNINativeInterface_ = packed record

    ...

      // J2SDK1_4
    NewDirectByteBuffer: function(Env: PJNIEnv; Address: Pointer; Capacity: JLong): JObject; {$IFDEF MSWINDOWS} stdcall; {$ENDIF} {$IFDEF LINUX} cdecl; {$ENDIF}
    GetDirectBufferAddress: function(Env: PJNIEnv; Buf: JObject): Pointer; {$IFDEF MSWINDOWS} stdcall; {$ENDIF} {$IFDEF LINUX} cdecl; {$ENDIF}
    GetDirectBufferCapacity: function(Env: PJNIEnv; Buf: JObject): JLong; {$IFDEF MSWINDOWS} stdcall; {$ENDIF} {$IFDEF LINUX} cdecl; {$ENDIF}
  end;


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Changes to JNI.pas that are not related to 1.4

  In TJavaVM class:

  Made JavaVM and Env read/write:

    public
      property JavaVM: PJavaVM read FJavaVM write FJavaVM;
      property Env: PJNIEnv read FEnv write FEnv;

  This allows a client to use the wrapper class even though the class
  isn't going to instantiate the VM. The idea behind the read-only property
  is that the TJavaVM class encapsulates all of the loading/unloading of the
  VM, so the client should never have to set these properties. However, if the
  VM is already running, then the TJavaVM class will need to use that VM.
  Most versions of the VM only allow one instance, so creating a second instance
  causes an exception.


  Changed {$IFDEF WIN32} to {$IFDEF MSWINDOWS} in JNI.pas to match Borland's
  changes in Delphi 6. The sample code still uses {$IFDEF WIN32} and I suspect
  this will be supported for quite a while.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Kylix stuff:

Part1 (HelloWorld) and Part2 (Native) work with jdk1.1.8, jdk1.3 (from Sun), and
j2sdk1.4.0.

Part3 (URLGrabber) works with jdk1.3 (from Borland's JBuilder 4) and j2sdk1.4.0
from Sun. Due to the threading code, I didn't try it with jdk1.1.8 because this
has been seen to fail under Windows. I'm not inclined to support older versions
of the JRE at this time.


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
General info:

Compatible with Delphi 4/5/6. The language features added in Delphi 4 prevent it
from being compatible with earlier versions. Specifically, those features not
available prior to D4 are:

1. 64-bit integers (the Int64 type)
2. Dynamic arrays
3. Overloaded functions
