This package demonstrates how to create, dynamically link, and access
native methods.  It consists of the following files:

.  NativeExample.java -- This file defines three native methods:

   . static String quote():  A class (static) method which returns a 
         quotation from a tiny database.

   . int twoTimes():  An instance method which returns twice the value
         of the object's myValue variable.  To make this more interesting
         myValue is a Java object (Integer).

   . NativeExample doubleUp():  An instance method which returns a new
         instance whose value is twice that of the object whose method was
         invoked.  This demonstrates new object creation and method
         invocation from a native method.

   This class uses a static block to load the example library.

.  example.c -- This file implements the three native methods described
   above.

.  win32\Makefile -- a Visual C++ 2.2 compatible makefile.  None of VC++'s
   features were used, so this file can probably be used with other Win32
   C compilers without too much effort.

To build this example, cd to the win32 directory and type "nmake".  The
following files are created (don't edit them):

.  NativeExample.c: a "stubs" file, which translates Java interpreter
   frame slots to C parameters and back.

.  NativeExample.h: the definition file which example.c must implement.

.  java_lang_Integer.h:  the header file for the Integer class, referenced
   by example.c.

.  example.dll:  the example native library.

To test the example, run "java NativeExample".

Tom Ball
Java Products Group, Sun Microsystems, Inc.
