jdk/src/share/npt/README.txt
changeset 25144 e2bf17cee34b
parent 25143 aade36e70da0
parent 25086 f5f41ed620d5
child 25145 82fa3e8aabee
child 25200 360a141ded8f
equal deleted inserted replaced
25143:aade36e70da0 25144:e2bf17cee34b
     1 
       
     2 README: For NPT Library.
       
     3 ------------------------
       
     4 
       
     5 To use this Native Platform Toolkit library, you need to add 
       
     6 -Isrc/share/npt and -I/src/${platform}/npt (platform is solaris or windows)
       
     7 to your compilation lines.
       
     8 
       
     9 To initialize/use the library:
       
    10 
       
    11     #include "npt.h"
       
    12     
       
    13     NptEnv *npt;
       
    14     
       
    15     NPT_INITIALIZE(&npt, NPT_VERSION, NULL);
       
    16     if (npt == NULL) {
       
    17         FATAL_ERROR_MESSAGE(("Unable to gain access to Npt library"));
       
    18     }
       
    19 
       
    20     /* To use the npt utf functions, they require initialization */
       
    21     npt->utf = (npt->utfInitialize)(NULL);
       
    22     if (npt->utf == NULL) {
       
    23         FATAL_ERROR_MESSAGE(("Unable to gain access to Npt utf functions"));
       
    24     }
       
    25 
       
    26     ...
       
    27 
       
    28 
       
    29     /* After all uses is done, it can be terminated, however, if the
       
    30      *   process will be exiting anyway it isn't necessary, and if
       
    31      *   you have other threads running that might use these handles
       
    32      *   you will need to wait here until all those threads have terminated.
       
    33      *   So in general, termination can be a pain and slow your process
       
    34      *   termination down.
       
    35      */
       
    36     (npt->utfTerminate)(npt->utf,NULL);
       
    37     NPT_TERMINATE(&npt, NULL);
       
    38 
       
    39