Java stubs (i.e. code to support Java clients for a set of SIDL
classes or interfaces) are created by invoking Babel as follows11.1
% babel -exclude-external -client=Java file.sidlor simply
% babel -E -cJava file.sidl
This will create a plethora of files, including a directory named file, which contains the Java client classes. Files ending in _IOR.h and _IOR.c implement the Intermediate Object Representation (IOR). Files ending with _jniStub.c are the Java Native Interface (JNI) stubs. The use of ``jni'' in the filename reflects the fact that the JNI is used to communicate between Java and the IOR. The remaining header files include the external Java API used by Java clients.
The stub files -- whose names end with _jniStub.c -- must be compiled and linked against the SIDL runtime library and an implementation. The resulting library needs to be referenced in a .scl file listed in the SIDL_DLL_PATH environment variable so the Babel runtime library loader can find it. Also, the current directory needs to be in the CLASSPATH environment variable so Java can find the file and sidl directories containing the client-side Java components. More information on environmental settings is given in Subsection 10.3.2.