Change to the msg-svr-base/examples directory.
Using a C compiler, compile the apub and asub examples using the Makefile.sample file. Set your library search path to include the msg-svr-base/examples directory.
Once the programs have been compiled, you can run them as follows in separate windows:
apub localhost 7997
asub localhost 7997
Whatever is typed in the apub window should appear on the asub window. Also, if you use the default settings, all iBiff notifications should appear in the asub window.
To receive notifications published by iBiff, write a program similar to asub.c
For more information on the sample programs, and writing your own programs for ENS, see the Sun Java Communications Suite 5 Event Notification Service Guide.
Once you set your library search path to include the msg-svr-base/lib directory, you can no longer stop and start the directory server. The workaround is to remove the entry from the library search path.