Using the following shell script to set up the CLASSPATH environment variable on MacOSX solved the problem finally:
UNO_PATH=/Applications/OpenOffice.org.app/Contents/program OOOJAVA=/Applications/OpenOffice.org.app/Contents/basis-link/ure-link/share/java export CLASSPATH=$CLASSPATH:$UNO_PATH:$OOOJAVA/juh.jar:$OOOJAVA/jurt.jar:$OOOJAVA/ridl.jar export CLASSPATH=$CLASSPATH:/Applications/OpenOffice.org.app/Contents/basis-link/program/classes/unoil.jar ---rony