setup01.txt 0.03                     UTF-8                    dh:2006-11-27

                      MASTER JNI NATIVE-METHOD CONFIRMATION

The info\odma\odmjni100\test\setup01 folder is used to verify that the
different cases for transfer between info.odma.odmjni100 components
and the odmjni100.dll implementations of native methods are all confirmed. .

The same environment used for Setup00 is also employed for Setup01.

The procedure is as follows, where <folder> is the file-system location
where the info\odma\... subfolder path starts:

 1. Backup the <folder>\info\odma\odmjni100\OdmJava.bat and the
    <folder>\info\odma\odmjni100\OdmPSDK.bat scripts that may have been
    customized already.  OdmVC++.bat and OdmJNI.bat should not require
    any modifications.

 2. Unzip the materials into <folder>.  The classpath location for the
    ODMJNI folder hierarchy is a good choice.  Make sure that the extract
    uses the subfolder structure of the Zip file.

 3. Extracting the full archive with directories will place material as
    follows:

        <folder>\
            info\
                odma\
                    odmjni100\
                            ODMJava.bat (0.01)
                            odmjni100-caveats.pdf
                            odmjni100-caveats.txt
                            ODMJNI.bat (0.01)
                            OdmPSDK.bat (0.03)
                            OdmVC++.bat (0.28)
                        test\
                            setup01\
                                    BuildClass01.bat (0.01)
                                    BuildDLL01a.bat (0.02)
                                    BuildDLL01b.bat (0.03)
                                    ConWriter.class
                                    IConOut.class
                                    PromptedIO-0.13.zip
                                    RunSetup01.bat (0.01)
                                    Setup01.c (0.05)
                                    Setup01.c.log.txt
                                    Setup01.class
                                    Setup01.cpp (0.06)
                                    Setup01.cpp.log.txt
                                    Setup01.dll
                                    Setup01.h
                                    Setup01.java (0.06)
                                    Setup01.txt (0.03 - this file)
                                    Setup01x.h (0.04)

 4. Review the <folder>\info\odma\odmjni100\OdmJava.bat file for proper
    operation on your computer.  There are two environment variables that
    must be set at the beginning of the file.  The third variable is
    probably all right as it is.

 5. In a console session, change to directory

      <folder>\info\odma\odmjni100\test\setup01

    Perform RunSetup01.bat in that location.

    You should see Setup01.call run, with console output.  It produces all
    of its results via interaction with native methods implemented in the
    Setup01.dll file.  The expected output is shown on the end of the
    Setup01.cpp.log.txt file.

 6. Operation of RunSetup01.bat on your computer demonstrates that the
    Setup00.dll has no dependencies on libraries not already on your
    computer.  It is limited to the i86 Win32 Windows platform, but there
    are no additional files that need to be installed along with it.

 7. You can recreate the Setup01.class by running script BuildClass01.bat.

 8. If you want to rebuild the code on your system, review the
    <folder>info\odma\odmjni100\OdmPSDK.bat file for proper location of the
    Windows Platform SDK on your computer.

 9. You can recreate the Setup00.dll by running script BuildDLL01a.bat
    or BuildDLL01b.bat.  The first implements the DLL using C Language.  The
    second implements the DLL using C++ Language.  This confirms that the
    differences in how JNI services are used from the two languages have
    been addressed properly.

10. The file Setup01x.h is an annotated version of the file that was
    produced by performing

        javah -jni Setup00

    And annotating the resulting Setup01.h (also included).

EXPERIMENTS

A number of experiments were performed in developing this version of
Setup01.

 1. The /MANIFEST:NO option is added to the compilation, but it doesn't
    seem to make any difference.

 2. It was verified that '\0' termination is used in converting UTF-8
    strings to Java String objects, and any intended nul character must
    be encoded as a two-byte UTF8-sequence (to prevent intended nuls
    being interpreted as string-ending nuls).  We are not going to have
    this problem.

 3. I keep looking for something that will make the DLL smaller.  This
    seems to be what I get and I will probably need the basic library that
    is included because of static linking (compilation option /MT).

    -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -

0.03 2006-11-27-19:48 The C++ version, Setup01.cpp 0.06 was created and
     tested for producing an equivalent Setup01.dll to that obtained with
     Setup01.c 0.05.  This was successful after making changes to the
     method calls and adjusting Setup01.cpp to use char for its stored
     ASCII strings rather than jbyte.  This avoided needing to make any
     casts.

0.02 2006-11-14-15:45 I have pretty much exhausted anything I can test
     other than implementing a class instantiation and release.  I need
     another approach to that if I want it to build on something.  On the
     other hand, it would help nail whether or not there are any issues
     between C Language and C++ use of interfaces.

0.01 2006-11-13-21:01 Clean up to record the 0.03 results and identify
     experiments that are conducted at this point.

0.00 2006-11-12-19:05 clone from setup00.txt 0.01 version to customize
     for the master native method exercises.

$Header: /ODMdev/info/odma/odmjni100/test/setup01/setup01.txt 7     06-11-27 20:09 Orcmid $

                          *** end of setup01.txt ***