There are some environment variables associated with running Java with Babel. You can find examples for some of these in the regression tests included with babel.
CLASSPATH: The CLASSPATH is an environment variable that Java uses to find .class files. It's is not specific to Babel, but it is necessary. It consists of a colon delimited series of directories to search for Java classes. In addition to any of your own Class files for use in Java server side, you should include build dir/lib/sidl-ver.jar where ver is the current sidl version, and build dir/runtime/java.
BABEL_JVM_FLAGS: This environment variable is used only when passing java command line variables to Java server side. It consists of a semi-colon delimited list of command line variables you wish to pass to Java server side. (A useful one might be -Xcheck:jni) )Here's an example:
BABEL_JVM_FLAGS="-verbose:gc;-Xmx500m"
It is also necessary to set your LD_LIBRARY_PATH (or LIBPATH on AIX) and SIDL_DLL_PATH correctly. Not including all the necessary files in the SIDL_DLL_PATH and LD_LIBRARY_PATH can crash the JVM in unhelpful ways. Babel tries to generate helpful error messages, but sometimes the JVM crashes due to missing files and doesn't generate very helpful output. If the JVM crashes, make sure you've included all the necessary files in your SIDL_DLL_PATH and LD_LIBRARY_PATH.