Invoking Babel to generate Java bindings

To create Java stubs (i.e. code to support Java clients to a set of SIDL classes or interfaces), you should invoke Babel as follows 11.1:

% babel -client=Java file.sidl
or more cryptically
% babel -cJava file.sidl

This will create a great plethora of files, including a directory named file. This directory contains the Java client classes, if you want to take a look at them. The files ending in _IOR.h and _IOR.c are the Intermediate Object Representation. The files ending with _jniStub.c are the JNI stubs -- the interface between a Java client and the IOR. The ``jni'' in the filename represents the fact that we use the Java Native Interface to communicate between Java and the IOR representation. The remaining header files have external Java API that Java clients may use.

To use the Java stubs, you must compile the stub files whose file names end with _jniStub.c and link them against the SIDL runtime library and a backend implementation. The resulting library needs to be referenced in a .scl file listed in the SIDL_DLL_PATH environment variable so that the Babel runtime library loader can find it. Also, the current directory needs to be in the CLASSPATH environment variable so that Java can find the file and sidl directories that contain the Java component of the client side.



babel-0.10.2
users_guide Last Modified 2005-03-23

http://www.llnl.gov/CASC/components
components@llnl.gov